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 |
Alexandre Julliard | c728efc | 2002-10-02 02:34:09 +0000 | [diff] [blame] | 11 | # C_SRCS16 : 16-bit C sources for the module |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 12 | # RC_SRCS : resource source files |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 13 | # EXTRA_SRCS : extra source files for make depend |
| 14 | # EXTRA_OBJS : extra object files |
Alexandre Julliard | 3245991 | 2002-05-09 00:05:48 +0000 | [diff] [blame] | 15 | # IMPORTS : dlls to import |
| 16 | # DELAYIMPORTS : dlls to import in delayed mode |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 17 | # SUBDIRS : subdirectories that contain a Makefile |
| 18 | # EXTRASUBDIRS : subdirectories that do not contain a Makefile |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 19 | # INSTALLSUBDIRS : subdirectories to run make install/uninstall into |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 20 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 21 | # First some useful definitions |
| 22 | |
Alexandre Julliard | 8664b89 | 1996-04-05 14:58:24 +0000 | [diff] [blame] | 23 | SHELL = /bin/sh |
| 24 | CC = @CC@ |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 25 | CPP = @CPP@ |
Alexandre Julliard | fc09423 | 2003-04-14 21:46:41 +0000 | [diff] [blame] | 26 | CFLAGS = @CFLAGS@ |
Alexandre Julliard | 1556639 | 2003-06-13 23:26:01 +0000 | [diff] [blame] | 27 | CPPFLAGS = @CPPFLAGS@ |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 28 | LIBS = @LIBS@ |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 29 | YACC = @YACC@ |
| 30 | LEX = @LEX@ |
| 31 | LEXLIB = @LEXLIB@ |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 32 | EXEEXT = @EXEEXT@ |
| 33 | OBJEXT = @OBJEXT@ |
Alexandre Julliard | 2fa4f76 | 2000-10-31 00:20:51 +0000 | [diff] [blame] | 34 | LIBEXT = @LIBEXT@ |
Alexandre Julliard | c1bfca0 | 2002-03-20 22:19:06 +0000 | [diff] [blame] | 35 | DLLEXT = @DLLEXT@ |
Alexandre Julliard | ada5e65 | 2002-12-12 22:03:14 +0000 | [diff] [blame] | 36 | IMPLIBEXT = @IMPLIBEXT@ |
Alexandre Julliard | 2fa4f76 | 2000-10-31 00:20:51 +0000 | [diff] [blame] | 37 | LDSHARED = @LDSHARED@ |
Alexandre Julliard | ada5e65 | 2002-12-12 22:03:14 +0000 | [diff] [blame] | 38 | DLLTOOL = @DLLTOOL@ |
Hidenori Takeshima | d48ca94 | 2000-12-22 22:28:00 +0000 | [diff] [blame] | 39 | DLLWRAP = @DLLWRAP@ |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 40 | AR = @AR@ rc |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 41 | RANLIB = @RANLIB@ |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 42 | STRIP = @STRIP@ |
| 43 | WINDRES = @WINDRES@ |
Alexandre Julliard | df234a9 | 2002-05-22 02:10:39 +0000 | [diff] [blame] | 44 | LN = @LN@ |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 45 | LN_S = @LN_S@ |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 46 | TOOLSDIR = @TOOLSDIR@ |
Marcus Meissner | 1d4db78 | 2003-01-09 00:46:54 +0000 | [diff] [blame] | 47 | AS = @AS@ |
Alexandre Julliard | eb5f89c | 2002-05-24 21:22:10 +0000 | [diff] [blame] | 48 | LD = @LD@ |
Marcus Meissner | a387aa4 | 2000-09-26 23:09:47 +0000 | [diff] [blame] | 49 | LDFLAGS = @LDFLAGS@ |
Alexandre Julliard | eb5f89c | 2002-05-24 21:22:10 +0000 | [diff] [blame] | 50 | LDCOMBINE = $(LD) -r |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 51 | RM = rm -f |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 52 | MV = mv |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 53 | LINT = @LINT@ |
| 54 | LINTFLAGS = @LINTFLAGS@ |
Alexandre Julliard | fc09423 | 2003-04-14 21:46:41 +0000 | [diff] [blame] | 55 | INCLUDES = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL) |
| 56 | EXTRACFLAGS = @EXTRACFLAGS@ |
Alexandre Julliard | 1556639 | 2003-06-13 23:26:01 +0000 | [diff] [blame] | 57 | ALLCFLAGS = $(INCLUDES) $(DEFS) $(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) |
Alexandre Julliard | fc09423 | 2003-04-14 21:46:41 +0000 | [diff] [blame] | 58 | ALLLINTFLAGS = $(INCLUDES) $(DEFS) $(LINTFLAGS) |
| 59 | MKINSTALLDIRS= $(TOPSRCDIR)/tools/mkinstalldirs -m 755 |
Patrik Stridvall | 385dc18 | 1999-09-29 10:24:19 +0000 | [diff] [blame] | 60 | WINAPI_CHECK = $(TOPSRCDIR)/tools/winapi_check/winapi_check |
Alexandre Julliard | 3536316 | 2002-05-22 21:32:49 +0000 | [diff] [blame] | 61 | WINEWRAPPER = $(TOPSRCDIR)/tools/winewrapper |
Richard Cohen | 6039fb0 | 2003-07-21 22:01:07 +0000 | [diff] [blame] | 62 | C2MAN = $(TOPSRCDIR)/tools/c2man.pl |
Dimitrie O. Paun | e39e8a1 | 2002-11-11 20:25:54 +0000 | [diff] [blame] | 63 | RUNTEST = $(TOPSRCDIR)/tools/runtest |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 64 | WINEBUILD = $(TOOLSDIR)/tools/winebuild/winebuild |
| 65 | MAKEDEP = $(TOOLSDIR)/tools/makedep |
| 66 | WRC = $(TOOLSDIR)/tools/wrc/wrc |
| 67 | WMC = $(TOOLSDIR)/tools/wmc/wmc |
Alexandre Julliard | ed2f8fc | 2002-12-03 23:36:05 +0000 | [diff] [blame] | 68 | WIDL = $(TOOLSDIR)/tools/widl/widl |
Dimitrie O. Paun | 1a1f9bf | 2003-05-06 18:34:53 +0000 | [diff] [blame] | 69 | RC = $(WRC) |
| 70 | RC16 = $(WRC) |
| 71 | RCFLAGS = --nostdinc $(INCLUDES) $(EXTRARCFLAGS) |
| 72 | RC16FLAGS = -O res16 $(RCFLAGS) |
Alexandre Julliard | 2a93f85 | 2002-12-11 01:34:51 +0000 | [diff] [blame] | 73 | LDPATH = @LDPATH@ |
| 74 | DLLDIR = $(TOPOBJDIR)/dlls |
Alexandre Julliard | e1a9b10 | 2003-05-01 03:16:21 +0000 | [diff] [blame] | 75 | LIBDIR = $(TOPOBJDIR)/libs |
Alexandre Julliard | 6a9fe36 | 2003-03-19 22:09:16 +0000 | [diff] [blame] | 76 | LIBPORT = -L$(TOPOBJDIR)/libs/port -lwine_port |
Alexandre Julliard | 7ab9a71 | 2003-03-21 05:06:48 +0000 | [diff] [blame] | 77 | LIBUNICODE = -L$(TOPOBJDIR)/libs/unicode -lwine_unicode |
Alexandre Julliard | 6692d39 | 2003-03-20 01:30:11 +0000 | [diff] [blame] | 78 | LIBUUID = -L$(TOPOBJDIR)/libs/uuid -lwine_uuid |
Alexandre Julliard | 2d1c790 | 2003-03-22 20:40:48 +0000 | [diff] [blame] | 79 | LIBWINE = -L$(TOPOBJDIR)/libs/wine -lwine |
Alexandre Julliard | b018239 | 2000-12-06 00:04:10 +0000 | [diff] [blame] | 80 | |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 81 | @SET_MAKE@ |
| 82 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 83 | # Installation infos |
| 84 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 85 | INSTALL = @INSTALL@ $(INSTALL_FLAGS) |
| 86 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(INSTALL_PROGRAM_FLAGS) |
| 87 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ $(INSTALL_SCRIPT_FLAGS) |
| 88 | INSTALL_DATA = @INSTALL_DATA@ $(INSTALL_DATA_FLAGS) |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 89 | prefix = @prefix@ |
| 90 | exec_prefix = @exec_prefix@ |
| 91 | bindir = @bindir@ |
| 92 | libdir = @libdir@ |
Alexandre Julliard | 1d8d017 | 2002-08-02 19:34:21 +0000 | [diff] [blame] | 93 | datadir = @datadir@ |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 94 | infodir = @infodir@ |
Alexandre Julliard | d6baf1b | 1999-07-18 15:47:22 +0000 | [diff] [blame] | 95 | mandir = @mandir@ |
Alexandre Julliard | 9bb05fc | 2002-05-14 18:36:54 +0000 | [diff] [blame] | 96 | sysconfdir = @sysconfdir@ |
| 97 | includedir = @includedir@/wine |
Alexandre Julliard | c1bfca0 | 2002-03-20 22:19:06 +0000 | [diff] [blame] | 98 | dlldir = @libdir@/wine |
Alexandre Julliard | d6baf1b | 1999-07-18 15:47:22 +0000 | [diff] [blame] | 99 | prog_manext = 1 |
Jon Griffiths | 35345f2 | 2003-03-15 19:48:34 +0000 | [diff] [blame] | 100 | api_manext = 3w |
Alexandre Julliard | d6baf1b | 1999-07-18 15:47:22 +0000 | [diff] [blame] | 101 | conf_manext = 5 |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 102 | CLEAN_FILES = *.o *.a *.so *.ln *.$(LIBEXT) \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej \ |
Alexandre Julliard | af62e83 | 2003-08-23 00:45:20 +0000 | [diff] [blame] | 103 | *.flc *.spec.c *.spec.def *.dbg.c y.tab.c y.tab.h @LEX_OUTPUT_ROOT@.c core |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 104 | |
Alexandre Julliard | c728efc | 2002-10-02 02:34:09 +0000 | [diff] [blame] | 105 | OBJS = $(C_SRCS:.c=.o) $(EXTRA_OBJS) |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 106 | |
Steven Edwards | 9138fbb | 2002-07-29 23:28:09 +0000 | [diff] [blame] | 107 | RCOBJS = $(RC_SRCS:.rc=.res.o) |
| 108 | LINTS = $(C_SRCS:.c=.ln) |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 109 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 110 | # Implicit rules |
| 111 | |
Alexandre Julliard | 21ee329 | 2003-04-21 22:52:31 +0000 | [diff] [blame] | 112 | .SUFFIXES: .mc .rc .mc.rc .res .res.o .spec .spec.c .spec.def .ok |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 113 | |
| 114 | .c.o: |
François Gouget | 1c3a242 | 2001-11-09 19:15:51 +0000 | [diff] [blame] | 115 | $(CC) -c $(ALLCFLAGS) -o $@ $< |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 116 | |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 117 | .s.o: |
François Gouget | 1c3a242 | 2001-11-09 19:15:51 +0000 | [diff] [blame] | 118 | $(AS) -o $@ $< |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 119 | |
Alexandre Julliard | 017a61e | 2000-11-06 05:30:48 +0000 | [diff] [blame] | 120 | .mc.mc.rc: |
Martin Fuchs | 3f44167 | 2002-10-19 17:15:00 +0000 | [diff] [blame] | 121 | $(LDPATH) $(WMC) -i -U -H /dev/null -o $@ $< |
Alexandre Julliard | f5aee67 | 2000-07-25 17:52:08 +0000 | [diff] [blame] | 122 | |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +0000 | [diff] [blame] | 123 | .rc.res: |
Dimitrie O. Paun | 1a1f9bf | 2003-05-06 18:34:53 +0000 | [diff] [blame] | 124 | $(LDPATH) $(RC) $(RCFLAGS) -fo$@ $< |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +0000 | [diff] [blame] | 125 | |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 126 | .res.res.o: |
| 127 | $(WINDRES) -i $< -o $@ |
| 128 | |
Ulrich Weigand | 3dff7bb | 1999-07-11 13:58:31 +0000 | [diff] [blame] | 129 | .spec.spec.c: |
Alexandre Julliard | 2e12d33 | 2003-04-21 23:54:05 +0000 | [diff] [blame] | 130 | $(WINEBUILD) $(DEFS) -o $@ --main-module $(MODULE) --spec $< |
Ulrich Weigand | 3dff7bb | 1999-07-11 13:58:31 +0000 | [diff] [blame] | 131 | |
Dmitry Timoshkov | 93a5b86 | 2002-02-04 18:48:18 +0000 | [diff] [blame] | 132 | .spec.spec.def: |
Alexandre Julliard | 2e12d33 | 2003-04-21 23:54:05 +0000 | [diff] [blame] | 133 | $(WINEBUILD) $(DEFS) -o $@ --def $< |
Dmitry Timoshkov | 93a5b86 | 2002-02-04 18:48:18 +0000 | [diff] [blame] | 134 | |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 135 | .c.ln: |
| 136 | $(LINT) -c $(ALLLINTFLAGS) $< || ( $(RM) $@ && exit 1 ) |
| 137 | |
Alexandre Julliard | caa0338 | 2002-02-20 19:03:59 +0000 | [diff] [blame] | 138 | .c.ok: |
Alexandre Julliard | edeee89 | 2002-08-09 01:22:40 +0000 | [diff] [blame] | 139 | $(RUNTEST) $(RUNTESTFLAGS) $< && touch $@ |
Alexandre Julliard | caa0338 | 2002-02-20 19:03:59 +0000 | [diff] [blame] | 140 | |
Alexandre Julliard | d0edc5f | 2000-03-04 22:31:27 +0000 | [diff] [blame] | 141 | # 'all' target first in case the enclosing Makefile didn't define any target |
| 142 | |
| 143 | all: Makefile |
| 144 | |
Patrik Stridvall | b719029 | 2001-07-29 20:20:13 +0000 | [diff] [blame] | 145 | filter: |
| 146 | @$(TOPSRCDIR)/tools/winapi/make_filter --make $(MAKE) all |
| 147 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 148 | .PHONY: all filter |
| 149 | |
Alexandre Julliard | ad53383 | 2002-05-14 20:54:58 +0000 | [diff] [blame] | 150 | # Rule for main module debug channels |
| 151 | |
Alexandre Julliard | c728efc | 2002-10-02 02:34:09 +0000 | [diff] [blame] | 152 | $(MODULE).dbg.c: $(C_SRCS) $(C_SRCS16) $(WINEBUILD) |
Alexandre Julliard | 2e12d33 | 2003-04-21 23:54:05 +0000 | [diff] [blame] | 153 | $(WINEBUILD) $(DEFS) -o $@ --debug -C$(SRCDIR) $(C_SRCS) $(C_SRCS16) |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +0000 | [diff] [blame] | 154 | |
Alexandre Julliard | 526531e | 2002-08-01 18:36:58 +0000 | [diff] [blame] | 155 | # Rule to rebuild the tools |
Bertho Stultiens | 3085591 | 2000-06-13 04:34:41 +0000 | [diff] [blame] | 156 | |
Alexandre Julliard | e048ada | 2003-03-23 20:00:02 +0000 | [diff] [blame] | 157 | $(MAKEDEP): |
Alexandre Julliard | 526531e | 2002-08-01 18:36:58 +0000 | [diff] [blame] | 158 | cd $(TOOLSDIR)/tools && $(MAKE) `basename $@` |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 159 | |
Alexandre Julliard | e66d421 | 1999-03-14 15:22:29 +0000 | [diff] [blame] | 160 | # Rules for makefile |
| 161 | |
Marcus Meissner | ca004e5 | 1999-01-03 12:26:22 +0000 | [diff] [blame] | 162 | Makefile: Makefile.in $(TOPSRCDIR)/configure |
| 163 | @echo Makefile is older than $?, please rerun $(TOPSRCDIR)/configure |
| 164 | @exit 1 |
| 165 | |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 166 | # Rule for linting |
| 167 | |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 168 | $(MODULE).ln : $(LINTS) |
| 169 | if test "$(LINTS)" ; \ |
| 170 | then \ |
| 171 | $(LINT) $(ALLLINTFLAGS) -o$(MODULE) $(LINTS) ; \ |
| 172 | $(MV) llib-l$(MODULE).ln $(MODULE).ln ; \ |
| 173 | else \ |
| 174 | $(LINT) $(ALLLINTFLAGS) -C$(MODULE) /dev/null ; \ |
| 175 | fi |
| 176 | |
| 177 | lint:: $(MODULE).ln |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 178 | |
Patrik Stridvall | 385dc18 | 1999-09-29 10:24:19 +0000 | [diff] [blame] | 179 | # Rules for Windows API checking |
| 180 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 181 | winapi_check:: dummy |
Patrik Stridvall | 385dc18 | 1999-09-29 10:24:19 +0000 | [diff] [blame] | 182 | $(WINAPI_CHECK) $(WINAPI_CHECK_FLAGS) $(WINAPI_CHECK_EXTRA_FLAGS) . |
| 183 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 184 | .PHONY: winapi_check |
| 185 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 186 | # Rules for dependencies |
| 187 | |
| 188 | $(SUBDIRS:%=%/__depend__): $(MAKEDEP) dummy |
| 189 | cd `dirname $@` && $(MAKE) depend |
| 190 | |
Alexandre Julliard | ad53383 | 2002-05-14 20:54:58 +0000 | [diff] [blame] | 191 | depend: $(MAKEDEP) $(SUBDIRS:%=%/__depend__) |
Alexandre Julliard | fc09423 | 2003-04-14 21:46:41 +0000 | [diff] [blame] | 192 | $(MAKEDEP) $(INCLUDES) -C$(SRCDIR) $(C_SRCS) $(C_SRCS16) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) $(IDL_SRCS) $(EXTRA_SRCS) |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 193 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 194 | .PHONY: depend $(SUBDIRS:%=%/__depend__) |
| 195 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 196 | # Rules for cleaning |
| 197 | |
| 198 | $(SUBDIRS:%=%/__clean__): dummy |
| 199 | cd `dirname $@` && $(MAKE) clean |
| 200 | |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 201 | $(SUBDIRS:%=%/__testclean__): dummy |
| 202 | cd `dirname $@` && $(MAKE) testclean |
| 203 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 204 | $(EXTRASUBDIRS:%=%/__clean__): dummy |
| 205 | -cd `dirname $@` && $(RM) $(CLEAN_FILES) |
| 206 | |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 207 | testclean:: $(SUBDIRS:%=%/__testclean__) |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 208 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 209 | clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__) |
Alexandre Julliard | c728efc | 2002-10-02 02:34:09 +0000 | [diff] [blame] | 210 | $(RM) $(CLEAN_FILES) $(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] | 211 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 212 | .PHONY: clean testclean $(SUBDIRS:%=%/__clean__) $(SUBDIRS:%=%/__testclean__) $(EXTRASUBDIRS:%=%/__clean__) |
| 213 | |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 214 | # Rules for installing |
| 215 | |
Alexandre Julliard | 2d1c790 | 2003-03-22 20:40:48 +0000 | [diff] [blame] | 216 | $(SUBDIRS:%=%/__install__): dummy |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 217 | cd `dirname $@` && $(MAKE) install |
| 218 | |
Alexandre Julliard | 2d1c790 | 2003-03-22 20:40:48 +0000 | [diff] [blame] | 219 | $(SUBDIRS:%=%/__install-lib__): dummy |
| 220 | cd `dirname $@` && $(MAKE) install-lib |
| 221 | |
| 222 | $(SUBDIRS:%=%/__install-dev__): dummy |
| 223 | cd `dirname $@` && $(MAKE) install-dev |
| 224 | |
| 225 | $(SUBDIRS:%=%/__uninstall__): dummy |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 226 | cd `dirname $@` && $(MAKE) uninstall |
| 227 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 228 | install:: $(INSTALLSUBDIRS:%=%/__install__) |
| 229 | |
| 230 | uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__) |
| 231 | |
Alexandre Julliard | ada5e65 | 2002-12-12 22:03:14 +0000 | [diff] [blame] | 232 | .PHONY: install install-lib install-dev uninstall \ |
Alexandre Julliard | 2d1c790 | 2003-03-22 20:40:48 +0000 | [diff] [blame] | 233 | $(SUBDIRS:%=%/__install__) $(SUBDIRS:%=%/__uninstall__) \ |
| 234 | $(SUBDIRS:%=%/__install-lib__) $(SUBDIRS:%=%/__install-dev__) |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 235 | |
Alexandre Julliard | edeee89 | 2002-08-09 01:22:40 +0000 | [diff] [blame] | 236 | # Rules for checking that no imports are missing |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 237 | |
Alexandre Julliard | edeee89 | 2002-08-09 01:22:40 +0000 | [diff] [blame] | 238 | $(SUBDIRS:%=%/__checklink__): dummy |
| 239 | @cd `dirname $@` && $(MAKE) checklink |
| 240 | |
| 241 | .PHONY: checklink $(SUBDIRS:%=%/__checklink__) |
| 242 | |
| 243 | # Rules for testing |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 244 | |
Alexandre Julliard | d7c606d | 2002-04-02 02:58:45 +0000 | [diff] [blame] | 245 | $(SUBDIRS:%=%/__test__): dummy |
| 246 | @cd `dirname $@` && $(MAKE) test |
| 247 | |
Alexandre Julliard | c3c587e | 2002-09-06 19:46:00 +0000 | [diff] [blame] | 248 | $(SUBDIRS:%=%/__crosstest__): dummy |
| 249 | @cd `dirname $@` && $(MAKE) crosstest |
| 250 | |
| 251 | .PHONY: check test crosstest $(SUBDIRS:%=%/__test__) $(SUBDIRS:%=%/__crosstest__) |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 252 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 253 | # Misc. rules |
| 254 | |
Dimitrie O. Paun | 1a1f9bf | 2003-05-06 18:34:53 +0000 | [diff] [blame] | 255 | $(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res): $(WRC) |
Dmitry Timoshkov | db79045 | 2001-05-31 21:37:29 +0000 | [diff] [blame] | 256 | |
Alexandre Julliard | 017a61e | 2000-11-06 05:30:48 +0000 | [diff] [blame] | 257 | $(MC_SRCS:.mc=.mc.rc): $(WMC) |
Alexandre Julliard | f5aee67 | 2000-07-25 17:52:08 +0000 | [diff] [blame] | 258 | |
Alexandre Julliard | aa89ecc | 2003-04-11 00:38:56 +0000 | [diff] [blame] | 259 | $(IDL_SRCS:.idl=.h): $(WIDL) |
| 260 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 261 | $(SUBDIRS): dummy |
| 262 | @cd $@ && $(MAKE) |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 263 | |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 264 | dummy: |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 265 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 266 | .PHONY: dummy $(SUBDIRS) |
| 267 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 268 | # End of global rules |