Added Makeprog.rules.in containing rules for building Winelib

programs.
This commit is contained in:
Alexandre Julliard 2000-11-10 23:35:20 +00:00
parent 864dc5981c
commit 626f425b6a
5 changed files with 72 additions and 7 deletions

11
configure vendored
View File

@ -6371,6 +6371,9 @@ MAKE_RULES=Make.rules
MAKE_DLL_RULES=dlls/Makedll.rules
MAKE_PROG_RULES=programs/Makeprog.rules
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
@ -6474,11 +6477,12 @@ ac_given_INSTALL="$INSTALL"
trap 'rm -fr `echo "
Make.rules
dlls/Makedll.rules
programs/Makeprog.rules
Makefile
console/Makefile
controls/Makefile
debugger/Makefile
dlls/Makedll.rules
dlls/Makefile
dlls/advapi32/Makefile
dlls/avifil32/Makefile
@ -6667,6 +6671,8 @@ s%@GCC_NO_BUILTIN@%$GCC_NO_BUILTIN%g
s%@MAKE_RULES@%%g
/@MAKE_DLL_RULES@/r $MAKE_DLL_RULES
s%@MAKE_DLL_RULES@%%g
/@MAKE_PROG_RULES@/r $MAKE_PROG_RULES
s%@MAKE_PROG_RULES@%%g
CEOF
EOF
@ -6709,11 +6715,12 @@ EOF
cat >> $CONFIG_STATUS <<EOF
CONFIG_FILES=\${CONFIG_FILES-"Make.rules
dlls/Makedll.rules
programs/Makeprog.rules
Makefile
console/Makefile
controls/Makefile
debugger/Makefile
dlls/Makedll.rules
dlls/Makefile
dlls/advapi32/Makefile
dlls/avifil32/Makefile

View File

@ -1045,13 +1045,17 @@ AC_SUBST_FILE(MAKE_RULES)
MAKE_DLL_RULES=dlls/Makedll.rules
AC_SUBST_FILE(MAKE_DLL_RULES)
MAKE_PROG_RULES=programs/Makeprog.rules
AC_SUBST_FILE(MAKE_PROG_RULES)
AC_OUTPUT([
Make.rules
dlls/Makedll.rules
programs/Makeprog.rules
Makefile
console/Makefile
controls/Makefile
debugger/Makefile
dlls/Makedll.rules
dlls/Makefile
dlls/advapi32/Makefile
dlls/avifil32/Makefile

View File

@ -1 +1,2 @@
Makefile
Makeprog.rules

View File

@ -25,10 +25,13 @@ all: $(SUBDIRS)
@MAKE_RULES@
install::
for i in $(SUBDIRS); do (cd $$i; $(MAKE) install) || exit 1; done
$(SUBDIRS:%=%/__checklink__): dummy
@cd `dirname $@` && $(MAKE) checklink
uninstall::
for i in $(SUBDIRS); do (cd $$i; $(MAKE) uninstall) || exit 1; done
install:: $(SUBDIRS:%=%/__install__)
uninstall:: $(SUBDIRS:%=%/__uninstall__)
checklink:: $(SUBDIRS:%=%/__checklink__)
### Dependencies:

View File

@ -0,0 +1,50 @@
# Global rules for building a Winelib program -*-Makefile-*-
#
# Each individual makefile should define the following variables:
# MODULE : name of the main module being built
# EXTRALIBS : extra libraries to link in (optional)
# EXTRADEFS : extra symbol definitions, like -DWINELIB (optional)
#
# plus all variables required by the global Make.rules.in
#
DEFS = @DLLFLAGS@ $(EXTRADEFS)
LDDLLFLAGS = @LDDLLFLAGS@
ALL_OBJS = $(OBJS) $(MODULE).spec.o
ALL_LIBS = -L$(TOPOBJDIR) -lwine $(EXTRALIBS) $(LIBS)
SYMBOLFILE = $(MODULE).tmp.o
all: $(MODULE)
@MAKE_RULES@
# Rules for main module
$(MODULE).so: $(ALL_OBJS) Makefile.in
$(LDSHARED) $(LDDLLFLAGS) $(ALL_OBJS) -o $@ $(ALL_LIBS)
$(MODULE): $(MODULE).so
$(RM) $(MODULE) && $(LN_S) $(TOPOBJDIR)/wine $(MODULE)
# Rules for checking that no imports are missing
checklink:: $(MODULE).so
$(CC) -o checklink $(TOPSRCDIR)/library/checklink.c $(MODULE).so $(ALL_LIBS) && $(RM) checklink
# Rules for debug channels
debug_channels: dummy
$(TOPSRCDIR)/tools/make_debug $(MODULE).spec $(C_SRCS)
# Rules for installation
install:: $(MODULE).so
[ -d $(bindir) ] || $(MKDIR) $(bindir)
$(INSTALL_PROGRAM) $(MODULE).so $(bindir)/$(MODULE).so
cd $(bindir) && $(LN_S) wine $(MODULE)
uninstall::
cd $(bindir) && $(RM) $(MODULE) $(MODULE).so
clean::
$(RM) $(MODULE)