Alexandre Julliard | 139a4b1 | 1996-11-02 14:24:07 +0000 | [diff] [blame] | 1 | # Global rules shared by all makefiles -*-Makefile-*- |
Alexandre Julliard | bf9130a | 1996-10-13 17:45:47 +0000 | [diff] [blame] | 2 | # |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 3 | # Each individual makefile must define the following variables: |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 4 | # TOPSRCDIR : top-level source directory |
| 5 | # TOPOBJDIR : top-level object directory |
| 6 | # SRCDIR : source directory for this module |
| 7 | # MODULE : name of the module being built |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 8 | # |
| 9 | # Each individual makefile may define the following additional variables: |
| 10 | # C_SRCS : C sources for the module |
| 11 | # ASM_SRCS : assembly sources |
Alexandre Julliard | 24c3c5e | 2000-05-24 03:31:04 +0000 | [diff] [blame] | 12 | # GEN_C_SRCS : generated C files |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 13 | # GEN_ASM_SRCS : generated assembly sources |
| 14 | # RC_SRCS : resource source files |
| 15 | # SPEC_SRCS : interface definition files |
| 16 | # GLUE : C sources for which glue code needs to be generated |
| 17 | # EXTRA_SRCS : extra source files for make depend |
| 18 | # EXTRA_OBJS : extra object files |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 19 | # SUBDIRS : subdirectories that contain a Makefile |
| 20 | # EXTRASUBDIRS : subdirectories that do not contain a Makefile |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 21 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 22 | # First some useful definitions |
| 23 | |
Alexandre Julliard | 8664b89 | 1996-04-05 14:58:24 +0000 | [diff] [blame] | 24 | SHELL = /bin/sh |
| 25 | CC = @CC@ |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 26 | CPP = @CPP@ |
Alexandre Julliard | 18f92e7 | 1996-07-17 20:02:21 +0000 | [diff] [blame] | 27 | CFLAGS = @CFLAGS@ |
Alexandre Julliard | 0623a6f | 1998-01-18 18:01:49 +0000 | [diff] [blame] | 28 | OPTIONS = @OPTIONS@ -D_REENTRANT |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 29 | X_CFLAGS = @X_CFLAGS@ |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 30 | X_LIBS = @X_LIBS@ |
Patrik Stridvall | ea58472 | 1998-11-01 16:22:07 +0000 | [diff] [blame] | 31 | XLIB = @X_PRE_LIBS@ @XLIB@ @X_EXTRA_LIBS@ |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 32 | LIBS = @LIBS@ |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 33 | YACC = @YACC@ |
| 34 | LEX = @LEX@ |
| 35 | LEXLIB = @LEXLIB@ |
Alexandre Julliard | 2fa4f76 | 2000-10-31 00:20:51 +0000 | [diff] [blame] | 36 | LIBEXT = @LIBEXT@ |
| 37 | LDSHARED = @LDSHARED@ |
Hidenori Takeshima | d48ca94 | 2000-12-22 22:28:00 +0000 | [diff] [blame] | 38 | DLLWRAP = @DLLWRAP@ |
| 39 | DLLWRAPFLAGS = --add-stdcall-alias |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 40 | RANLIB = @RANLIB@ |
| 41 | LN_S = @LN_S@ |
Alexandre Julliard | 91222da | 2000-12-10 23:01:33 +0000 | [diff] [blame] | 42 | DIVINCL = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL) |
Marcus Meissner | d43eb2d | 2000-01-08 22:23:43 +0000 | [diff] [blame] | 43 | ALLCFLAGS = $(DIVINCL) $(CFLAGS) $(DEFS) $(OPTIONS) $(X_CFLAGS) |
Dimitrie O. Paun | 79e44ab | 2000-12-05 04:13:36 +0000 | [diff] [blame] | 44 | LDCOMBINE = @LDCOMBINE@ |
Marcus Meissner | a387aa4 | 2000-09-26 23:09:47 +0000 | [diff] [blame] | 45 | LDFLAGS = @LDFLAGS@ |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 46 | AR = ar rc |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 47 | RM = rm -f |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 48 | MV = mv |
Alexandre Julliard | 829fe32 | 1998-07-26 14:27:39 +0000 | [diff] [blame] | 49 | MKDIR = mkdir -p |
Alexandre Julliard | c7c217b | 1998-04-13 12:21:30 +0000 | [diff] [blame] | 50 | C2MAN = @C2MAN@ |
Mike McCormack | 4306eaa | 2000-07-23 19:27:00 +0000 | [diff] [blame] | 51 | MANSPECS = -w $(TOPSRCDIR)/dlls/gdi/gdi32.spec \ |
| 52 | -w $(TOPSRCDIR)/dlls/user/user32.spec \ |
| 53 | -w $(TOPSRCDIR)/dlls/comctl32/comctl32.spec \ |
Mike McCormack | 76e25f6 | 2001-07-26 20:06:00 +0000 | [diff] [blame] | 54 | -w $(TOPSRCDIR)/dlls/commdlg/comdlg32.spec \ |
Mike McCormack | 4306eaa | 2000-07-23 19:27:00 +0000 | [diff] [blame] | 55 | -w $(TOPSRCDIR)/dlls/kernel/kernel32.spec |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 56 | LINT = @LINT@ |
| 57 | LINTFLAGS = @LINTFLAGS@ |
| 58 | ALLLINTFLAGS = $(LINTFLAGS) $(DEFS) $(OPTIONS) $(DIVINCL) |
Patrik Stridvall | 385dc18 | 1999-09-29 10:24:19 +0000 | [diff] [blame] | 59 | WINAPI_CHECK = $(TOPSRCDIR)/tools/winapi_check/winapi_check |
Alexandre Julliard | 21ec006 | 2000-10-23 21:39:39 +0000 | [diff] [blame] | 60 | WINEBUILD = $(TOPOBJDIR)/tools/winebuild/winebuild |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 61 | MAKEDEP = $(TOPOBJDIR)/tools/makedep |
| 62 | WRC = $(TOPOBJDIR)/tools/wrc/wrc |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 63 | WMC = $(TOPOBJDIR)/tools/wmc/wmc |
Hidenori Takeshima | d48ca94 | 2000-12-22 22:28:00 +0000 | [diff] [blame] | 64 | LDPATH = @LDPATH@ |
Alexandre Julliard | 0adad95 | 2000-01-26 01:45:58 +0000 | [diff] [blame] | 65 | DLLDIR = $(TOPOBJDIR)/dlls |
Alexandre Julliard | b018239 | 2000-12-06 00:04:10 +0000 | [diff] [blame] | 66 | LIBWINE = -L$(TOPOBJDIR)/library -lwine |
| 67 | LIBTSX11 = -L$(TOPOBJDIR)/tsx11 -lwine_tsx11 |
| 68 | LIBUNICODE= -L$(TOPOBJDIR)/unicode -lwine_unicode |
Alexandre Julliard | c4d1176 | 2000-12-27 19:06:44 +0000 | [diff] [blame] | 69 | LIBUUID = -L$(TOPOBJDIR)/ole -lwine_uuid |
Alexandre Julliard | b018239 | 2000-12-06 00:04:10 +0000 | [diff] [blame] | 70 | |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 71 | @SET_MAKE@ |
| 72 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 73 | # Installation infos |
| 74 | |
| 75 | INSTALL = @INSTALL@ |
| 76 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
Satsuki Fujishima | f34f418 | 2001-03-19 19:19:23 +0000 | [diff] [blame] | 77 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 78 | INSTALL_DATA = @INSTALL_DATA@ |
| 79 | prefix = @prefix@ |
| 80 | exec_prefix = @exec_prefix@ |
| 81 | bindir = @bindir@ |
| 82 | libdir = @libdir@ |
| 83 | infodir = @infodir@ |
Alexandre Julliard | d6baf1b | 1999-07-18 15:47:22 +0000 | [diff] [blame] | 84 | mandir = @mandir@ |
| 85 | prog_manext = 1 |
| 86 | conf_manext = 5 |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 87 | includedir = @includedir@/wine |
Alexandre Julliard | 24c3c5e | 2000-05-24 03:31:04 +0000 | [diff] [blame] | 88 | CLEAN_FILES = *.o *.a *.so *.ln \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej \ |
| 89 | *.flc *.spec.c *.glue.c y.tab.c y.tab.h lex.yy.c core |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 90 | |
Alexandre Julliard | 24c3c5e | 2000-05-24 03:31:04 +0000 | [diff] [blame] | 91 | OBJS = $(SPEC_SRCS:.spec=.spec.o) $(C_SRCS:.c=.o) $(GEN_C_SRCS:.c=.o) $(GEN_ASM_SRCS:.s=.o) \ |
Alexandre Julliard | cbeb644 | 2000-10-25 20:33:58 +0000 | [diff] [blame] | 92 | $(ASM_SRCS:.S=.o) $(GLUE:.c=.glue.o) $(EXTRA_OBJS) |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 93 | |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 94 | LINTS = $(C_SRCS:.c=.ln) |
| 95 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 96 | # Implicit rules |
| 97 | |
Alexandre Julliard | 000c13a | 2000-11-09 20:31:18 +0000 | [diff] [blame] | 98 | .SUFFIXES: .mc .rc .mc.rc .res .spec .spec.c .glue.c |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 99 | |
| 100 | .c.o: |
François Gouget | 1c3a242 | 2001-11-09 19:15:51 +0000 | [diff] [blame] | 101 | $(CC) -c $(ALLCFLAGS) -o $@ $< |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 102 | |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 103 | .s.o: |
François Gouget | 1c3a242 | 2001-11-09 19:15:51 +0000 | [diff] [blame] | 104 | $(AS) -o $@ $< |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 105 | |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 106 | .S.o: |
François Gouget | 1c3a242 | 2001-11-09 19:15:51 +0000 | [diff] [blame] | 107 | $(CC) -c -o $@ $< |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 108 | |
Alexandre Julliard | 017a61e | 2000-11-06 05:30:48 +0000 | [diff] [blame] | 109 | .mc.mc.rc: |
| 110 | $(LDPATH) $(WMC) -i -H /dev/null -o $@ $< |
Alexandre Julliard | f5aee67 | 2000-07-25 17:52:08 +0000 | [diff] [blame] | 111 | |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +0000 | [diff] [blame] | 112 | .rc.res: |
Alexandre Julliard | 017a61e | 2000-11-06 05:30:48 +0000 | [diff] [blame] | 113 | $(LDPATH) $(WRC) $(WRCFLAGS) $(DIVINCL) -o $@ -r $< |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +0000 | [diff] [blame] | 114 | |
Ulrich Weigand | 3dff7bb | 1999-07-11 13:58:31 +0000 | [diff] [blame] | 115 | .spec.spec.c: |
Alexandre Julliard | b018239 | 2000-12-06 00:04:10 +0000 | [diff] [blame] | 116 | $(LDPATH) $(WINEBUILD) @DLLFLAGS@ -L$(DLLDIR) -o $@ -spec $< |
Ulrich Weigand | 3dff7bb | 1999-07-11 13:58:31 +0000 | [diff] [blame] | 117 | |
Ulrich Weigand | 8336cc9 | 1999-08-15 12:45:53 +0000 | [diff] [blame] | 118 | .c.glue.c: |
Alexandre Julliard | 017a61e | 2000-11-06 05:30:48 +0000 | [diff] [blame] | 119 | $(LDPATH) $(WINEBUILD) @DLLFLAGS@ -o $@ -glue $< |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 120 | |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 121 | .c.ln: |
| 122 | $(LINT) -c $(ALLLINTFLAGS) $< || ( $(RM) $@ && exit 1 ) |
| 123 | |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 124 | .PHONY: all install uninstall clean distclean depend dummy |
| 125 | |
Alexandre Julliard | d0edc5f | 2000-03-04 22:31:27 +0000 | [diff] [blame] | 126 | # 'all' target first in case the enclosing Makefile didn't define any target |
| 127 | |
| 128 | all: Makefile |
| 129 | |
Patrik Stridvall | b719029 | 2001-07-29 20:20:13 +0000 | [diff] [blame] | 130 | filter: |
| 131 | @$(TOPSRCDIR)/tools/winapi/make_filter --make $(MAKE) all |
| 132 | |
Alexandre Julliard | 000c13a | 2000-11-09 20:31:18 +0000 | [diff] [blame] | 133 | # Rule for main module intermediate object |
| 134 | |
| 135 | $(MODULE).tmp.o: $(OBJS) Makefile.in |
| 136 | $(LDCOMBINE) $(OBJS) -o $@ |
Alexandre Julliard | caf5f89 | 2000-11-13 04:17:00 +0000 | [diff] [blame] | 137 | -strip --strip-unneeded $@ |
Alexandre Julliard | 000c13a | 2000-11-09 20:31:18 +0000 | [diff] [blame] | 138 | |
| 139 | # Rule for main module spec file |
| 140 | |
| 141 | $(MODULE).spec.c: $(MODULE).spec $(RC_SRCS:.rc=.res) $(SYMBOLFILE) $(WINEBUILD) |
Alexandre Julliard | b018239 | 2000-12-06 00:04:10 +0000 | [diff] [blame] | 142 | $(LDPATH) $(WINEBUILD) @DLLFLAGS@ -L$(DLLDIR) $(SYMBOLFILE:%=-sym %) -o $@ -spec $(SRCDIR)/$(MODULE).spec |
Alexandre Julliard | 000c13a | 2000-11-09 20:31:18 +0000 | [diff] [blame] | 143 | |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +0000 | [diff] [blame] | 144 | # Rule to rebuild the resource compiler |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 145 | |
Alexandre Julliard | 21ec006 | 2000-10-23 21:39:39 +0000 | [diff] [blame] | 146 | $(WRC): |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 147 | cd $(TOPOBJDIR)/tools/wrc && $(MAKE) wrc |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +0000 | [diff] [blame] | 148 | |
Bertho Stultiens | 3085591 | 2000-06-13 04:34:41 +0000 | [diff] [blame] | 149 | # Rule to rebuild the message compiler |
| 150 | |
Alexandre Julliard | 21ec006 | 2000-10-23 21:39:39 +0000 | [diff] [blame] | 151 | $(WMC): |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 152 | cd $(TOPOBJDIR)/tools/wmc && $(MAKE) wmc |
Bertho Stultiens | 3085591 | 2000-06-13 04:34:41 +0000 | [diff] [blame] | 153 | |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 154 | # Rule to rebuild the 'makedep' program |
Alexandre Julliard | 530ee84 | 1996-10-23 16:59:13 +0000 | [diff] [blame] | 155 | |
Alexandre Julliard | 21ec006 | 2000-10-23 21:39:39 +0000 | [diff] [blame] | 156 | $(MAKEDEP): |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 157 | cd $(TOPOBJDIR)/tools && $(MAKE) makedep |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 158 | |
Alexandre Julliard | e482eeb | 2000-06-23 20:15:35 +0000 | [diff] [blame] | 159 | # Rule to rebuild the 'winebuild' program |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 160 | |
Alexandre Julliard | 21ec006 | 2000-10-23 21:39:39 +0000 | [diff] [blame] | 161 | $(WINEBUILD): |
Alexandre Julliard | e482eeb | 2000-06-23 20:15:35 +0000 | [diff] [blame] | 162 | cd $(TOPOBJDIR)/tools/winebuild && $(MAKE) winebuild |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 163 | |
Alexandre Julliard | e66d421 | 1999-03-14 15:22:29 +0000 | [diff] [blame] | 164 | # Rules for makefile |
| 165 | |
Marcus Meissner | ca004e5 | 1999-01-03 12:26:22 +0000 | [diff] [blame] | 166 | Makefile: Makefile.in $(TOPSRCDIR)/configure |
| 167 | @echo Makefile is older than $?, please rerun $(TOPSRCDIR)/configure |
| 168 | @exit 1 |
| 169 | |
Alexandre Julliard | 829fe32 | 1998-07-26 14:27:39 +0000 | [diff] [blame] | 170 | # Rules for auto documentation |
Alexandre Julliard | 44ed71f | 1997-12-21 19:17:50 +0000 | [diff] [blame] | 171 | |
Francois Gouget | b83bb6d | 2001-08-22 18:01:39 +0000 | [diff] [blame] | 172 | $(SUBDIRS:%=%/__man__): dummy |
| 173 | cd `dirname $@` && $(MAKE) man |
Alexandre Julliard | 829fe32 | 1998-07-26 14:27:39 +0000 | [diff] [blame] | 174 | |
Francois Gouget | b83bb6d | 2001-08-22 18:01:39 +0000 | [diff] [blame] | 175 | man: $(C_SRCS) $(SUBDIRS:%=%/__man__) |
| 176 | if [ -n "$(C_SRCS)" ]; then $(MKDIR) $(TOPOBJDIR)/documentation/man3w; for i in $(C_SRCS); do $(C2MAN) -L -o $(TOPOBJDIR)/documentation/man3w -S3w $(DIVINCL) -D__WINE__ $(MANSPECS) $$i; done; fi |
| 177 | |
| 178 | $(SUBDIRS:%=%/__doc_html__): dummy |
| 179 | cd `dirname $@` && $(MAKE) doc-html |
| 180 | |
| 181 | doc-html: $(C_SRCS) $(SUBDIRS:%=%/__doc_html__) |
| 182 | if [ -n "$(C_SRCS)" ]; then $(MKDIR) $(TOPOBJDIR)/documentation/html; for i in $(C_SRCS); do $(C2MAN) -L -o $(TOPOBJDIR)/documentation/html -Th -iwindows.h $(DIVINCL) -D__WINE__ $(MANSPECS) $$i; done; fi |
Alexandre Julliard | 829fe32 | 1998-07-26 14:27:39 +0000 | [diff] [blame] | 183 | |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 184 | # Rule for linting |
| 185 | |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 186 | $(MODULE).ln : $(LINTS) |
| 187 | if test "$(LINTS)" ; \ |
| 188 | then \ |
| 189 | $(LINT) $(ALLLINTFLAGS) -o$(MODULE) $(LINTS) ; \ |
| 190 | $(MV) llib-l$(MODULE).ln $(MODULE).ln ; \ |
| 191 | else \ |
| 192 | $(LINT) $(ALLLINTFLAGS) -C$(MODULE) /dev/null ; \ |
| 193 | fi |
| 194 | |
| 195 | lint:: $(MODULE).ln |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 196 | |
Patrik Stridvall | 385dc18 | 1999-09-29 10:24:19 +0000 | [diff] [blame] | 197 | # Rules for Windows API checking |
| 198 | |
| 199 | winapi_check:: |
| 200 | $(WINAPI_CHECK) $(WINAPI_CHECK_FLAGS) $(WINAPI_CHECK_EXTRA_FLAGS) . |
| 201 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 202 | # Rules for dependencies |
| 203 | |
| 204 | $(SUBDIRS:%=%/__depend__): $(MAKEDEP) dummy |
| 205 | cd `dirname $@` && $(MAKE) depend |
| 206 | |
Alexandre Julliard | 017a61e | 2000-11-06 05:30:48 +0000 | [diff] [blame] | 207 | depend: $(MAKEDEP) $(GEN_C_SRCS) $(SUBDIRS:%=%/__depend__) |
Dmitry Timoshkov | db79045 | 2001-05-31 21:37:29 +0000 | [diff] [blame] | 208 | $(MAKEDEP) $(DIVINCL) -C$(SRCDIR) $(C_SRCS) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) $(EXTRA_SRCS) -C. $(GEN_C_SRCS) |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 209 | |
| 210 | # Rules for cleaning |
| 211 | |
| 212 | $(SUBDIRS:%=%/__clean__): dummy |
| 213 | cd `dirname $@` && $(MAKE) clean |
| 214 | |
| 215 | $(EXTRASUBDIRS:%=%/__clean__): dummy |
| 216 | -cd `dirname $@` && $(RM) $(CLEAN_FILES) |
| 217 | |
| 218 | clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__) |
Dmitry Timoshkov | db79045 | 2001-05-31 21:37:29 +0000 | [diff] [blame] | 219 | $(RM) $(CLEAN_FILES) $(GEN_C_SRCS) $(GEN_ASM_SRCS) $(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res) $(MC_SRCS:.mc=.mc.rc) $(PROGRAMS) |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 220 | |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 221 | # Rules for installing |
| 222 | |
| 223 | $(SUBDIRS:%=%/__install__): dummy |
| 224 | cd `dirname $@` && $(MAKE) install |
| 225 | |
| 226 | $(SUBDIRS:%=%/__uninstall__): dummy |
| 227 | cd `dirname $@` && $(MAKE) uninstall |
| 228 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 229 | # Misc. rules |
| 230 | |
Alexandre Julliard | 21ec006 | 2000-10-23 21:39:39 +0000 | [diff] [blame] | 231 | $(SPEC_SRCS:.spec=.spec.c): $(WINEBUILD) $(TOPSRCDIR)/include/builtin16.h |
Ulrich Weigand | 3dff7bb | 1999-07-11 13:58:31 +0000 | [diff] [blame] | 232 | |
Alexandre Julliard | 21ec006 | 2000-10-23 21:39:39 +0000 | [diff] [blame] | 233 | $(GLUE:.c=.glue.c): $(WINEBUILD) $(TOPSRCDIR)/include/builtin16.h |
Ulrich Weigand | 3dff7bb | 1999-07-11 13:58:31 +0000 | [diff] [blame] | 234 | |
Alexandre Julliard | cbeb644 | 2000-10-25 20:33:58 +0000 | [diff] [blame] | 235 | $(RC_SRCS:.rc=.res): $(WRC) |
Alexandre Julliard | d0edc5f | 2000-03-04 22:31:27 +0000 | [diff] [blame] | 236 | |
Dmitry Timoshkov | db79045 | 2001-05-31 21:37:29 +0000 | [diff] [blame] | 237 | $(RC_SRCS16:.rc=.res): $(WRC) |
| 238 | |
Alexandre Julliard | 017a61e | 2000-11-06 05:30:48 +0000 | [diff] [blame] | 239 | $(MC_SRCS:.mc=.mc.rc): $(WMC) |
Alexandre Julliard | f5aee67 | 2000-07-25 17:52:08 +0000 | [diff] [blame] | 240 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 241 | $(SUBDIRS): dummy |
| 242 | @cd $@ && $(MAKE) |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 243 | |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 244 | dummy: |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 245 | |
| 246 | # End of global rules |