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-*-
|
# 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
|
# TOPSRCDIR : top-level source directory
|
||||||
# TOPOBJDIR : top-level object directory
|
# TOPOBJDIR : top-level object directory
|
||||||
# SRCDIR : source directory for this module
|
# SRCDIR : source directory for this module
|
||||||
# MODULE : name of the module being built
|
# MODULE : name of the module being built
|
||||||
# C_SRCS : C sources for the module (optional)
|
#
|
||||||
# ASM_SRCS : assembly sources (optional)
|
# Each individual makefile may define the following additional variables:
|
||||||
# GEN_ASM_SRCS : generated assembly sources (optional)
|
# C_SRCS : C sources for the module
|
||||||
# RC_SRCS : resource source files (optional)
|
# ASM_SRCS : assembly sources
|
||||||
# SPEC_SRCS : interface definition files (optional)
|
# GEN_ASM_SRCS : generated assembly sources
|
||||||
# GLUE : C sources for which glue code needs to be generated (optional)
|
# RC_SRCS : resource source files
|
||||||
# EXTRA_SRCS : extra source files for make depend (optional)
|
# SPEC_SRCS : interface definition files
|
||||||
# EXTRA_OBJS : extra object files (optional)
|
# GLUE : C sources for which glue code needs to be generated
|
||||||
# WRCEXTRA : extra wrc flags (e.g. '-p _SysRes') (optional)
|
# 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
|
# First some useful definitions
|
||||||
|
|
||||||
|
@ -241,6 +245,25 @@ lint:: $(MODULE).ln
|
||||||
winapi_check::
|
winapi_check::
|
||||||
$(WINAPI_CHECK) $(WINAPI_CHECK_FLAGS) $(WINAPI_CHECK_EXTRA_FLAGS) .
|
$(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
|
# Misc. rules
|
||||||
|
|
||||||
$(SPEC_SRCS:.spec=.spec.c): $(BUILD) $(TOPSRCDIR)/include/builtin16.h $(TOPSRCDIR)/include/builtin32.h
|
$(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)
|
$(RC_SRCS:.rc=.s): $(WRC)
|
||||||
|
|
||||||
depend:: $(MAKEDEP) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS)
|
$(SUBDIRS): dummy
|
||||||
$(MAKEDEP) $(DIVINCL) -C$(SRCDIR) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS)
|
@cd $@ && $(MAKE)
|
||||||
|
|
||||||
clean::
|
|
||||||
$(RM) $(CLEAN_FILES) $(GEN_ASM_SRCS) $(RC_SRCS:.rc=.s) $(RC_SRCS:.rc=.h) $(PROGRAMS)
|
|
||||||
|
|
||||||
dummy:
|
dummy:
|
||||||
|
|
||||||
|
|
23
Makefile.in
23
Makefile.in
|
@ -23,9 +23,7 @@ MODULE = wine
|
||||||
SOVERSION = 1.0
|
SOVERSION = 1.0
|
||||||
SONAME = libwine.so
|
SONAME = libwine.so
|
||||||
|
|
||||||
TOOLSUBDIRS = \
|
TOOLSUBDIRS = tools
|
||||||
tools \
|
|
||||||
tools/wrc
|
|
||||||
|
|
||||||
LIBSUBDIRS = \
|
LIBSUBDIRS = \
|
||||||
controls \
|
controls \
|
||||||
|
@ -74,16 +72,14 @@ PROGRAMS = \
|
||||||
windows/x11drv/wineclipsrv
|
windows/x11drv/wineclipsrv
|
||||||
|
|
||||||
# Sub-directories to run make into
|
# Sub-directories to run make into
|
||||||
BUILDSUBDIRS = \
|
SUBDIRS = \
|
||||||
$(TOOLSUBDIRS) \
|
$(TOOLSUBDIRS) \
|
||||||
$(LIBSUBDIRS) \
|
$(LIBSUBDIRS) \
|
||||||
$(DLLDIR) \
|
$(DLLDIR) \
|
||||||
$(EMUSUBDIRS) \
|
$(EMUSUBDIRS) \
|
||||||
$(PROGSUBDIRS) \
|
$(PROGSUBDIRS) \
|
||||||
$(DOCSUBDIRS)
|
$(DOCSUBDIRS) \
|
||||||
|
include
|
||||||
# Sub-directories to run make depend into
|
|
||||||
DEPENDSUBDIRS = $(LIBSUBDIRS) $(DLLDIR) $(EMUSUBDIRS) $(DOCSUBDIRS)
|
|
||||||
|
|
||||||
# Sub-directories to run make install into
|
# Sub-directories to run make install into
|
||||||
INSTALLSUBDIRS = $(DLLDIR) $(DOCSUBDIRS) $(INCSUBDIRS)
|
INSTALLSUBDIRS = $(DLLDIR) $(DOCSUBDIRS) $(INCSUBDIRS)
|
||||||
|
@ -91,9 +87,6 @@ INSTALLSUBDIRS = $(DLLDIR) $(DOCSUBDIRS) $(INCSUBDIRS)
|
||||||
# Sub-directories to run make lint into
|
# Sub-directories to run make lint into
|
||||||
LINTSUBDIRS = $(LIBSUBDIRS) $(DLLDIR) $(EMUSUBDIRS) $(DOCSUBDIRS)
|
LINTSUBDIRS = $(LIBSUBDIRS) $(DLLDIR) $(EMUSUBDIRS) $(DOCSUBDIRS)
|
||||||
|
|
||||||
# Extra sub-directories to clean
|
|
||||||
CLEANSUBDIRS = dlls include include/bitmaps include/wine tools/cvdump
|
|
||||||
|
|
||||||
LIBOBJS = \
|
LIBOBJS = \
|
||||||
controls/controls.o \
|
controls/controls.o \
|
||||||
console/console.o \
|
console/console.o \
|
||||||
|
@ -201,9 +194,6 @@ checklink::
|
||||||
$(EMUOBJS) $(LIBOBJS) $(DLLOBJS) $(PROGRAMS): $(TOOLSUBDIRS) dummy
|
$(EMUOBJS) $(LIBOBJS) $(DLLOBJS) $(PROGRAMS): $(TOOLSUBDIRS) dummy
|
||||||
@cd `dirname $@` && $(MAKE) `basename $@`
|
@cd `dirname $@` && $(MAKE) `basename $@`
|
||||||
|
|
||||||
$(BUILDSUBDIRS): dummy
|
|
||||||
@cd $@ && $(MAKE)
|
|
||||||
|
|
||||||
$(LIBLINTS) $(EMULINTS): dummy
|
$(LIBLINTS) $(EMULINTS): dummy
|
||||||
@cd `dirname $@` && $(MAKE) lint
|
@cd `dirname $@` && $(MAKE) lint
|
||||||
|
|
||||||
|
@ -220,9 +210,6 @@ install::
|
||||||
uninstall::
|
uninstall::
|
||||||
for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
|
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::
|
checklink::
|
||||||
@cd dlls && $(MAKE) checklink
|
@cd dlls && $(MAKE) checklink
|
||||||
|
|
||||||
|
@ -238,8 +225,6 @@ htmlpages:
|
||||||
for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
|
for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
|
||||||
|
|
||||||
clean::
|
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
|
$(RM) wine wine.sym libwine.so.1.0 TAGS
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
|
|
|
@ -29,7 +29,7 @@ EXTRA_OBJS = y.tab.o lex.yy.o
|
||||||
|
|
||||||
all: $(MODULE).o
|
all: $(MODULE).o
|
||||||
|
|
||||||
depend:: y.tab.h
|
depend: y.tab.h
|
||||||
|
|
||||||
#
|
#
|
||||||
# This is a special test program that helps debug the internal debugger.
|
# This is a special test program that helps debug the internal debugger.
|
||||||
|
|
|
@ -84,6 +84,52 @@ EXTRADLLNAMES = \
|
||||||
winaspi \
|
winaspi \
|
||||||
winsock
|
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@
|
@MAKE_RULES@
|
||||||
|
|
||||||
all: $(DLLS:%=lib%.@LIBEXT@) $(EXTRADLLNAMES:%=lib%.@LIBEXT@)
|
all: $(DLLS:%=lib%.@LIBEXT@) $(EXTRADLLNAMES:%=lib%.@LIBEXT@)
|
||||||
|
@ -252,9 +298,6 @@ libx11drv.@LIBEXT@: x11drv/libx11drv.@LIBEXT@
|
||||||
$(DLLFILES): dummy
|
$(DLLFILES): dummy
|
||||||
@cd `dirname $@` && $(MAKE)
|
@cd `dirname $@` && $(MAKE)
|
||||||
|
|
||||||
$(DLLFILES:%=%_depend_): dummy
|
|
||||||
@cd `dirname $@` && $(MAKE) depend
|
|
||||||
|
|
||||||
$(DLLFILES:%=%_install_): dummy
|
$(DLLFILES:%=%_install_): dummy
|
||||||
@cd `dirname $@` && $(MAKE) install
|
@cd `dirname $@` && $(MAKE) install
|
||||||
|
|
||||||
|
@ -264,15 +307,8 @@ $(DLLFILES:%=%_uninstall_): dummy
|
||||||
$(DLLFILES:%=%_checklink_): dummy
|
$(DLLFILES:%=%_checklink_): dummy
|
||||||
@cd `dirname $@` && $(MAKE) checklink
|
@cd `dirname $@` && $(MAKE) checklink
|
||||||
|
|
||||||
$(DLLFILES:%=%_clean_): dummy
|
|
||||||
@cd `dirname $@` && $(MAKE) clean
|
|
||||||
|
|
||||||
depend:: $(DLLFILES:%=%_depend_)
|
|
||||||
|
|
||||||
install:: $(DLLFILES:%=%_install_)
|
install:: $(DLLFILES:%=%_install_)
|
||||||
|
|
||||||
uninstall:: $(DLLFILES:%=%_uninstall_)
|
uninstall:: $(DLLFILES:%=%_uninstall_)
|
||||||
|
|
||||||
checklink:: $(DLLFILES:%=%_checklink_)
|
checklink:: $(DLLFILES:%=%_checklink_)
|
||||||
|
|
||||||
clean:: $(DLLFILES:%=%_clean_)
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ C_SRCS = \
|
||||||
helper.c \
|
helper.c \
|
||||||
main.c
|
main.c
|
||||||
|
|
||||||
SUBDIRS = \
|
EXTRASUBDIRS = \
|
||||||
d3ddevice \
|
d3ddevice \
|
||||||
dclipper \
|
dclipper \
|
||||||
ddraw \
|
ddraw \
|
||||||
|
@ -56,7 +56,4 @@ SUBDIRS = \
|
||||||
|
|
||||||
@MAKE_DLL_RULES@
|
@MAKE_DLL_RULES@
|
||||||
|
|
||||||
clean::
|
|
||||||
for i in $(SUBDIRS); do (cd $$i && $(RM) $(CLEAN_FILES)); done
|
|
||||||
|
|
||||||
### Dependencies:
|
### Dependencies:
|
||||||
|
|
|
@ -23,11 +23,5 @@ SUBDIRS = \
|
||||||
$(EXTRA_OBJS): $(TOOLSUBDIRS) dummy
|
$(EXTRA_OBJS): $(TOOLSUBDIRS) dummy
|
||||||
@cd `dirname $@` && $(MAKE) `basename $@`
|
@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:
|
### Dependencies:
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,4 @@ SUBDIRS = \
|
||||||
|
|
||||||
all: check_wrc
|
all: check_wrc
|
||||||
|
|
||||||
$(SUBDIRS): dummy
|
|
||||||
@cd $@ && $(MAKE)
|
|
||||||
|
|
||||||
### Dependencies:
|
### Dependencies:
|
||||||
|
|
|
@ -25,11 +25,4 @@ SUBDIRS = \
|
||||||
$(EXTRA_OBJS): $(TOOLSUBDIRS) dummy
|
$(EXTRA_OBJS): $(TOOLSUBDIRS) dummy
|
||||||
@cd `dirname $@` && $(MAKE) `basename $@`
|
@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:
|
### Dependencies:
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ HTMLFILES = \
|
||||||
|
|
||||||
DVIFILES = wine.dvi
|
DVIFILES = wine.dvi
|
||||||
|
|
||||||
|
EXTRASUBDIRS = samples status
|
||||||
|
|
||||||
all: $(INFOFILES) $(DVIFILES) $(HTMLFILES)
|
all: $(INFOFILES) $(DVIFILES) $(HTMLFILES)
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,8 @@ INSTALLED_INCLUDES = \
|
||||||
wingdi.h \
|
wingdi.h \
|
||||||
winuser.h
|
winuser.h
|
||||||
|
|
||||||
|
EXTRASUBDIRS = bitmaps wine
|
||||||
|
|
||||||
@MAKE_RULES@
|
@MAKE_RULES@
|
||||||
|
|
||||||
install::
|
install::
|
||||||
|
|
|
@ -9,6 +9,8 @@ C_SRCS = \
|
||||||
guid.c \
|
guid.c \
|
||||||
ole2nls.c
|
ole2nls.c
|
||||||
|
|
||||||
|
EXTRASUBDIRS = nls
|
||||||
|
|
||||||
all: $(MODULE).o
|
all: $(MODULE).o
|
||||||
|
|
||||||
@MAKE_RULES@
|
@MAKE_RULES@
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
TOPSRCDIR = @top_srcdir@
|
||||||
|
TOPOBJDIR = ..
|
||||||
|
SRCDIR = @srcdir@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
MODULE = none
|
||||||
|
|
||||||
SUBDIRS = \
|
SUBDIRS = \
|
||||||
avitools \
|
avitools \
|
||||||
clock \
|
clock \
|
||||||
|
@ -16,19 +22,12 @@ SUBDIRS = \
|
||||||
|
|
||||||
all: $(SUBDIRS)
|
all: $(SUBDIRS)
|
||||||
|
|
||||||
$(SUBDIRS): dummy
|
@MAKE_RULES@
|
||||||
@cd $@; $(MAKE)
|
|
||||||
|
|
||||||
depend:
|
install::
|
||||||
for i in $(SUBDIRS); do (cd $$i; $(MAKE) depend) || exit 1; done
|
|
||||||
|
|
||||||
install:
|
|
||||||
for i in $(SUBDIRS); do (cd $$i; $(MAKE) install) || exit 1; done
|
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
|
for i in $(SUBDIRS); do (cd $$i; $(MAKE) uninstall) || exit 1; done
|
||||||
|
|
||||||
clean:
|
### Dependencies:
|
||||||
for i in $(SUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
|
|
||||||
|
|
||||||
dummy:
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ RC_SRCS = rsrc.rc
|
||||||
|
|
||||||
all: check_wrc check_winestub $(PROGRAMS)
|
all: check_wrc check_winestub $(PROGRAMS)
|
||||||
|
|
||||||
depend:: y.tab.h
|
depend: y.tab.h
|
||||||
|
|
||||||
@MAKE_RULES@
|
@MAKE_RULES@
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,16 @@ MODULE = none
|
||||||
|
|
||||||
C_SRCS = build.c makedep.c fnt2bdf.c bin2res.c
|
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)
|
all: $(PROGRAMS)
|
||||||
|
|
||||||
@MAKE_RULES@
|
@MAKE_RULES@
|
||||||
|
|
|
@ -22,7 +22,7 @@ EXTRA_OBJS = y.tab.o lex.yy.o
|
||||||
|
|
||||||
all: $(PROGRAMS)
|
all: $(PROGRAMS)
|
||||||
|
|
||||||
depend:: y.tab.h
|
depend: y.tab.h
|
||||||
|
|
||||||
@MAKE_RULES@
|
@MAKE_RULES@
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue