Improved support for Makefiles that need to recurse in subdirectories.
This commit is contained in:
parent
10ad97c838
commit
c53ceba478
|
@ -1,19 +1,23 @@
|
|||
# Global rules shared by all makefiles -*-Makefile-*-
|
||||
#
|
||||
# Each individual makefile should define the following variables:
|
||||
# Each individual makefile must define the following variables:
|
||||
# TOPSRCDIR : top-level source directory
|
||||
# TOPOBJDIR : top-level object directory
|
||||
# SRCDIR : source directory for this module
|
||||
# MODULE : name of the module being built
|
||||
# C_SRCS : C sources for the module (optional)
|
||||
# ASM_SRCS : assembly sources (optional)
|
||||
# GEN_ASM_SRCS : generated assembly sources (optional)
|
||||
# RC_SRCS : resource source files (optional)
|
||||
# SPEC_SRCS : interface definition files (optional)
|
||||
# GLUE : C sources for which glue code needs to be generated (optional)
|
||||
# EXTRA_SRCS : extra source files for make depend (optional)
|
||||
# EXTRA_OBJS : extra object files (optional)
|
||||
# WRCEXTRA : extra wrc flags (e.g. '-p _SysRes') (optional)
|
||||
#
|
||||
# Each individual makefile may define the following additional variables:
|
||||
# C_SRCS : C sources for the module
|
||||
# ASM_SRCS : assembly sources
|
||||
# GEN_ASM_SRCS : generated assembly sources
|
||||
# RC_SRCS : resource source files
|
||||
# SPEC_SRCS : interface definition files
|
||||
# GLUE : C sources for which glue code needs to be generated
|
||||
# EXTRA_SRCS : extra source files for make depend
|
||||
# EXTRA_OBJS : extra object files
|
||||
# WRCEXTRA : extra wrc flags (e.g. '-p _SysRes')
|
||||
# SUBDIRS : subdirectories that contain a Makefile
|
||||
# EXTRASUBDIRS : subdirectories that do not contain a Makefile
|
||||
|
||||
# First some useful definitions
|
||||
|
||||
|
@ -241,6 +245,25 @@ lint:: $(MODULE).ln
|
|||
winapi_check::
|
||||
$(WINAPI_CHECK) $(WINAPI_CHECK_FLAGS) $(WINAPI_CHECK_EXTRA_FLAGS) .
|
||||
|
||||
# Rules for dependencies
|
||||
|
||||
$(SUBDIRS:%=%/__depend__): $(MAKEDEP) dummy
|
||||
cd `dirname $@` && $(MAKE) depend
|
||||
|
||||
depend: $(MAKEDEP) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS) $(SUBDIRS:%=%/__depend__)
|
||||
$(MAKEDEP) $(DIVINCL) -C$(SRCDIR) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS)
|
||||
|
||||
# Rules for cleaning
|
||||
|
||||
$(SUBDIRS:%=%/__clean__): dummy
|
||||
cd `dirname $@` && $(MAKE) clean
|
||||
|
||||
$(EXTRASUBDIRS:%=%/__clean__): dummy
|
||||
-cd `dirname $@` && $(RM) $(CLEAN_FILES)
|
||||
|
||||
clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__)
|
||||
$(RM) $(CLEAN_FILES) $(GEN_ASM_SRCS) $(RC_SRCS:.rc=.s) $(RC_SRCS:.rc=.h) $(PROGRAMS)
|
||||
|
||||
# Misc. rules
|
||||
|
||||
$(SPEC_SRCS:.spec=.spec.c): $(BUILD) $(TOPSRCDIR)/include/builtin16.h $(TOPSRCDIR)/include/builtin32.h
|
||||
|
@ -249,11 +272,8 @@ $(GLUE:.c=.glue.c): $(BUILD) $(TOPSRCDIR)/include/builtin16.h $(TOPSRCDIR)/inclu
|
|||
|
||||
$(RC_SRCS:.rc=.s): $(WRC)
|
||||
|
||||
depend:: $(MAKEDEP) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS)
|
||||
$(MAKEDEP) $(DIVINCL) -C$(SRCDIR) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS)
|
||||
|
||||
clean::
|
||||
$(RM) $(CLEAN_FILES) $(GEN_ASM_SRCS) $(RC_SRCS:.rc=.s) $(RC_SRCS:.rc=.h) $(PROGRAMS)
|
||||
$(SUBDIRS): dummy
|
||||
@cd $@ && $(MAKE)
|
||||
|
||||
dummy:
|
||||
|
||||
|
|
23
Makefile.in
23
Makefile.in
|
@ -23,9 +23,7 @@ MODULE = wine
|
|||
SOVERSION = 1.0
|
||||
SONAME = libwine.so
|
||||
|
||||
TOOLSUBDIRS = \
|
||||
tools \
|
||||
tools/wrc
|
||||
TOOLSUBDIRS = tools
|
||||
|
||||
LIBSUBDIRS = \
|
||||
controls \
|
||||
|
@ -74,16 +72,14 @@ PROGRAMS = \
|
|||
windows/x11drv/wineclipsrv
|
||||
|
||||
# Sub-directories to run make into
|
||||
BUILDSUBDIRS = \
|
||||
SUBDIRS = \
|
||||
$(TOOLSUBDIRS) \
|
||||
$(LIBSUBDIRS) \
|
||||
$(DLLDIR) \
|
||||
$(EMUSUBDIRS) \
|
||||
$(PROGSUBDIRS) \
|
||||
$(DOCSUBDIRS)
|
||||
|
||||
# Sub-directories to run make depend into
|
||||
DEPENDSUBDIRS = $(LIBSUBDIRS) $(DLLDIR) $(EMUSUBDIRS) $(DOCSUBDIRS)
|
||||
$(DOCSUBDIRS) \
|
||||
include
|
||||
|
||||
# Sub-directories to run make install into
|
||||
INSTALLSUBDIRS = $(DLLDIR) $(DOCSUBDIRS) $(INCSUBDIRS)
|
||||
|
@ -91,9 +87,6 @@ INSTALLSUBDIRS = $(DLLDIR) $(DOCSUBDIRS) $(INCSUBDIRS)
|
|||
# Sub-directories to run make lint into
|
||||
LINTSUBDIRS = $(LIBSUBDIRS) $(DLLDIR) $(EMUSUBDIRS) $(DOCSUBDIRS)
|
||||
|
||||
# Extra sub-directories to clean
|
||||
CLEANSUBDIRS = dlls include include/bitmaps include/wine tools/cvdump
|
||||
|
||||
LIBOBJS = \
|
||||
controls/controls.o \
|
||||
console/console.o \
|
||||
|
@ -201,9 +194,6 @@ checklink::
|
|||
$(EMUOBJS) $(LIBOBJS) $(DLLOBJS) $(PROGRAMS): $(TOOLSUBDIRS) dummy
|
||||
@cd `dirname $@` && $(MAKE) `basename $@`
|
||||
|
||||
$(BUILDSUBDIRS): dummy
|
||||
@cd $@ && $(MAKE)
|
||||
|
||||
$(LIBLINTS) $(EMULINTS): dummy
|
||||
@cd `dirname $@` && $(MAKE) lint
|
||||
|
||||
|
@ -220,9 +210,6 @@ install::
|
|||
uninstall::
|
||||
for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
|
||||
|
||||
depend::
|
||||
for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
|
||||
|
||||
checklink::
|
||||
@cd dlls && $(MAKE) checklink
|
||||
|
||||
|
@ -238,8 +225,6 @@ htmlpages:
|
|||
for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
|
||||
|
||||
clean::
|
||||
for i in $(BUILDSUBDIRS); do (cd $$i && $(MAKE) clean) || exit 1; done
|
||||
for i in $(CLEANSUBDIRS); do (cd $$i && $(RM) $(CLEAN_FILES)); done
|
||||
$(RM) wine wine.sym libwine.so.1.0 TAGS
|
||||
|
||||
distclean: clean
|
||||
|
|
|
@ -29,7 +29,7 @@ EXTRA_OBJS = y.tab.o lex.yy.o
|
|||
|
||||
all: $(MODULE).o
|
||||
|
||||
depend:: y.tab.h
|
||||
depend: y.tab.h
|
||||
|
||||
#
|
||||
# This is a special test program that helps debug the internal debugger.
|
||||
|
|
|
@ -84,6 +84,52 @@ EXTRADLLNAMES = \
|
|||
winaspi \
|
||||
winsock
|
||||
|
||||
SUBDIRS = \
|
||||
avifil32 \
|
||||
comctl32 \
|
||||
commdlg \
|
||||
dciman32 \
|
||||
ddraw \
|
||||
dinput \
|
||||
dplayx \
|
||||
dsound \
|
||||
gdi \
|
||||
icmp \
|
||||
imagehlp \
|
||||
imm32 \
|
||||
lzexpand \
|
||||
mpr \
|
||||
msacm \
|
||||
msacm32 \
|
||||
msnet32 \
|
||||
msvideo \
|
||||
odbc32 \
|
||||
ole32 \
|
||||
oleaut32 \
|
||||
olecli \
|
||||
oledlg \
|
||||
olepro32 \
|
||||
olesvr \
|
||||
psapi \
|
||||
rasapi32 \
|
||||
setupx \
|
||||
shell32 \
|
||||
sound \
|
||||
stress \
|
||||
tapi32 \
|
||||
ttydrv \
|
||||
user \
|
||||
version \
|
||||
win32s \
|
||||
win87em \
|
||||
winaspi \
|
||||
windebug \
|
||||
wing \
|
||||
winmm \
|
||||
winsock \
|
||||
winspool \
|
||||
x11drv
|
||||
|
||||
@MAKE_RULES@
|
||||
|
||||
all: $(DLLS:%=lib%.@LIBEXT@) $(EXTRADLLNAMES:%=lib%.@LIBEXT@)
|
||||
|
@ -252,9 +298,6 @@ libx11drv.@LIBEXT@: x11drv/libx11drv.@LIBEXT@
|
|||
$(DLLFILES): dummy
|
||||
@cd `dirname $@` && $(MAKE)
|
||||
|
||||
$(DLLFILES:%=%_depend_): dummy
|
||||
@cd `dirname $@` && $(MAKE) depend
|
||||
|
||||
$(DLLFILES:%=%_install_): dummy
|
||||
@cd `dirname $@` && $(MAKE) install
|
||||
|
||||
|
@ -264,15 +307,8 @@ $(DLLFILES:%=%_uninstall_): dummy
|
|||
$(DLLFILES:%=%_checklink_): dummy
|
||||
@cd `dirname $@` && $(MAKE) checklink
|
||||
|
||||
$(DLLFILES:%=%_clean_): dummy
|
||||
@cd `dirname $@` && $(MAKE) clean
|
||||
|
||||
depend:: $(DLLFILES:%=%_depend_)
|
||||
|
||||
install:: $(DLLFILES:%=%_install_)
|
||||
|
||||
uninstall:: $(DLLFILES:%=%_uninstall_)
|
||||
|
||||
checklink:: $(DLLFILES:%=%_checklink_)
|
||||
|
||||
clean:: $(DLLFILES:%=%_clean_)
|
||||
|
|
|
@ -46,7 +46,7 @@ C_SRCS = \
|
|||
helper.c \
|
||||
main.c
|
||||
|
||||
SUBDIRS = \
|
||||
EXTRASUBDIRS = \
|
||||
d3ddevice \
|
||||
dclipper \
|
||||
ddraw \
|
||||
|
@ -56,7 +56,4 @@ SUBDIRS = \
|
|||
|
||||
@MAKE_DLL_RULES@
|
||||
|
||||
clean::
|
||||
for i in $(SUBDIRS); do (cd $$i && $(RM) $(CLEAN_FILES)); done
|
||||
|
||||
### Dependencies:
|
||||
|
|
|
@ -23,11 +23,5 @@ SUBDIRS = \
|
|||
$(EXTRA_OBJS): $(TOOLSUBDIRS) dummy
|
||||
@cd `dirname $@` && $(MAKE) `basename $@`
|
||||
|
||||
depend::
|
||||
for i in $(SUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
|
||||
|
||||
clean::
|
||||
for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean) || exit 1; done
|
||||
|
||||
### Dependencies:
|
||||
|
||||
|
|
|
@ -41,7 +41,4 @@ SUBDIRS = \
|
|||
|
||||
all: check_wrc
|
||||
|
||||
$(SUBDIRS): dummy
|
||||
@cd $@ && $(MAKE)
|
||||
|
||||
### Dependencies:
|
||||
|
|
|
@ -25,11 +25,4 @@ SUBDIRS = \
|
|||
$(EXTRA_OBJS): $(TOOLSUBDIRS) dummy
|
||||
@cd `dirname $@` && $(MAKE) `basename $@`
|
||||
|
||||
depend::
|
||||
for i in $(SUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
|
||||
|
||||
clean::
|
||||
for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean) || exit 1; done
|
||||
|
||||
### Dependencies:
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ HTMLFILES = \
|
|||
|
||||
DVIFILES = wine.dvi
|
||||
|
||||
EXTRASUBDIRS = samples status
|
||||
|
||||
all: $(INFOFILES) $(DVIFILES) $(HTMLFILES)
|
||||
|
||||
|
|
|
@ -10,6 +10,8 @@ INSTALLED_INCLUDES = \
|
|||
wingdi.h \
|
||||
winuser.h
|
||||
|
||||
EXTRASUBDIRS = bitmaps wine
|
||||
|
||||
@MAKE_RULES@
|
||||
|
||||
install::
|
||||
|
|
|
@ -9,6 +9,8 @@ C_SRCS = \
|
|||
guid.c \
|
||||
ole2nls.c
|
||||
|
||||
EXTRASUBDIRS = nls
|
||||
|
||||
all: $(MODULE).o
|
||||
|
||||
@MAKE_RULES@
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = none
|
||||
|
||||
SUBDIRS = \
|
||||
avitools \
|
||||
clock \
|
||||
|
@ -16,19 +22,12 @@ SUBDIRS = \
|
|||
|
||||
all: $(SUBDIRS)
|
||||
|
||||
$(SUBDIRS): dummy
|
||||
@cd $@; $(MAKE)
|
||||
@MAKE_RULES@
|
||||
|
||||
depend:
|
||||
for i in $(SUBDIRS); do (cd $$i; $(MAKE) depend) || exit 1; done
|
||||
|
||||
install:
|
||||
install::
|
||||
for i in $(SUBDIRS); do (cd $$i; $(MAKE) install) || exit 1; done
|
||||
|
||||
uninstall:
|
||||
uninstall::
|
||||
for i in $(SUBDIRS); do (cd $$i; $(MAKE) uninstall) || exit 1; done
|
||||
|
||||
clean:
|
||||
for i in $(SUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
|
||||
|
||||
dummy:
|
||||
### Dependencies:
|
||||
|
|
|
@ -23,7 +23,7 @@ RC_SRCS = rsrc.rc
|
|||
|
||||
all: check_wrc check_winestub $(PROGRAMS)
|
||||
|
||||
depend:: y.tab.h
|
||||
depend: y.tab.h
|
||||
|
||||
@MAKE_RULES@
|
||||
|
||||
|
|
|
@ -9,6 +9,16 @@ MODULE = none
|
|||
|
||||
C_SRCS = build.c makedep.c fnt2bdf.c bin2res.c
|
||||
|
||||
SUBDIRS = \
|
||||
cvdump \
|
||||
wrc
|
||||
|
||||
EXTRASUBDIRS = \
|
||||
winapi_check \
|
||||
winapi_check/win16 \
|
||||
winapi_check/win32 \
|
||||
wineconf.libs
|
||||
|
||||
all: $(PROGRAMS)
|
||||
|
||||
@MAKE_RULES@
|
||||
|
|
|
@ -22,7 +22,7 @@ EXTRA_OBJS = y.tab.o lex.yy.o
|
|||
|
||||
all: $(PROGRAMS)
|
||||
|
||||
depend:: y.tab.h
|
||||
depend: y.tab.h
|
||||
|
||||
@MAKE_RULES@
|
||||
|
||||
|
|
Loading…
Reference in New Issue