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 |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 16 | # EXTRA_SRCS : extra source files for make depend |
| 17 | # EXTRA_OBJS : extra object files |
Alexandre Julliard | 3245991 | 2002-05-09 00:05:48 +0000 | [diff] [blame] | 18 | # IMPORTS : dlls to import |
| 19 | # DELAYIMPORTS : dlls to import in delayed mode |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 20 | # SUBDIRS : subdirectories that contain a Makefile |
| 21 | # EXTRASUBDIRS : subdirectories that do not contain a Makefile |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 22 | # INSTALLSUBDIRS : subdirectories to run make install/uninstall into |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 23 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 24 | # First some useful definitions |
| 25 | |
Alexandre Julliard | 8664b89 | 1996-04-05 14:58:24 +0000 | [diff] [blame] | 26 | SHELL = /bin/sh |
| 27 | CC = @CC@ |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 28 | CPP = @CPP@ |
Alexandre Julliard | 4b92255 | 2002-08-02 19:12:01 +0000 | [diff] [blame] | 29 | CFLAGS = @CFLAGS@ $(EXTRACFLAGS) |
Alexandre Julliard | 0623a6f | 1998-01-18 18:01:49 +0000 | [diff] [blame] | 30 | OPTIONS = @OPTIONS@ -D_REENTRANT |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 31 | X_CFLAGS = @X_CFLAGS@ |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 32 | X_LIBS = @X_LIBS@ |
Patrik Stridvall | ea58472 | 1998-11-01 16:22:07 +0000 | [diff] [blame] | 33 | XLIB = @X_PRE_LIBS@ @XLIB@ @X_EXTRA_LIBS@ |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 34 | LIBS = @LIBS@ |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 35 | YACC = @YACC@ |
| 36 | LEX = @LEX@ |
| 37 | LEXLIB = @LEXLIB@ |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 38 | EXEEXT = @EXEEXT@ |
| 39 | OBJEXT = @OBJEXT@ |
Alexandre Julliard | 2fa4f76 | 2000-10-31 00:20:51 +0000 | [diff] [blame] | 40 | LIBEXT = @LIBEXT@ |
Alexandre Julliard | c1bfca0 | 2002-03-20 22:19:06 +0000 | [diff] [blame] | 41 | DLLEXT = @DLLEXT@ |
Alexandre Julliard | 2fa4f76 | 2000-10-31 00:20:51 +0000 | [diff] [blame] | 42 | LDSHARED = @LDSHARED@ |
Hidenori Takeshima | d48ca94 | 2000-12-22 22:28:00 +0000 | [diff] [blame] | 43 | DLLWRAP = @DLLWRAP@ |
| 44 | DLLWRAPFLAGS = --add-stdcall-alias |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 45 | AR = @AR@ rc |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 46 | RANLIB = @RANLIB@ |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 47 | STRIP = @STRIP@ |
| 48 | WINDRES = @WINDRES@ |
Alexandre Julliard | df234a9 | 2002-05-22 02:10:39 +0000 | [diff] [blame] | 49 | LN = @LN@ |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 50 | LN_S = @LN_S@ |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 51 | TOOLSDIR = @TOOLSDIR@ |
Alexandre Julliard | 91222da | 2000-12-10 23:01:33 +0000 | [diff] [blame] | 52 | DIVINCL = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL) |
Marcus Meissner | d43eb2d | 2000-01-08 22:23:43 +0000 | [diff] [blame] | 53 | ALLCFLAGS = $(DIVINCL) $(CFLAGS) $(DEFS) $(OPTIONS) $(X_CFLAGS) |
Alexandre Julliard | eb5f89c | 2002-05-24 21:22:10 +0000 | [diff] [blame] | 54 | LD = @LD@ |
Marcus Meissner | a387aa4 | 2000-09-26 23:09:47 +0000 | [diff] [blame] | 55 | LDFLAGS = @LDFLAGS@ |
Alexandre Julliard | eb5f89c | 2002-05-24 21:22:10 +0000 | [diff] [blame] | 56 | LDCOMBINE = $(LD) -r |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 57 | RM = rm -f |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 58 | MV = mv |
Alexandre Julliard | c7c217b | 1998-04-13 12:21:30 +0000 | [diff] [blame] | 59 | C2MAN = @C2MAN@ |
Mike McCormack | 4306eaa | 2000-07-23 19:27:00 +0000 | [diff] [blame] | 60 | MANSPECS = -w $(TOPSRCDIR)/dlls/gdi/gdi32.spec \ |
| 61 | -w $(TOPSRCDIR)/dlls/user/user32.spec \ |
| 62 | -w $(TOPSRCDIR)/dlls/comctl32/comctl32.spec \ |
Mike McCormack | 76e25f6 | 2001-07-26 20:06:00 +0000 | [diff] [blame] | 63 | -w $(TOPSRCDIR)/dlls/commdlg/comdlg32.spec \ |
Alexandre Julliard | 7cae558 | 2002-06-01 02:55:48 +0000 | [diff] [blame] | 64 | -w $(TOPSRCDIR)/dlls/kernel/kernel32.spec |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 65 | LINT = @LINT@ |
| 66 | LINTFLAGS = @LINTFLAGS@ |
| 67 | ALLLINTFLAGS = $(LINTFLAGS) $(DEFS) $(OPTIONS) $(DIVINCL) |
Alexandre Julliard | ce830a9 | 2002-05-09 04:31:39 +0000 | [diff] [blame] | 68 | MKINSTALLDIRS= $(TOPSRCDIR)/tools/mkinstalldirs |
Patrik Stridvall | 385dc18 | 1999-09-29 10:24:19 +0000 | [diff] [blame] | 69 | WINAPI_CHECK = $(TOPSRCDIR)/tools/winapi_check/winapi_check |
Alexandre Julliard | 3536316 | 2002-05-22 21:32:49 +0000 | [diff] [blame] | 70 | WINEWRAPPER = $(TOPSRCDIR)/tools/winewrapper |
Alexandre Julliard | edeee89 | 2002-08-09 01:22:40 +0000 | [diff] [blame] | 71 | RUNTEST = $(TOPSRCDIR)/programs/winetest/runtest |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 72 | WINEBUILD = $(TOOLSDIR)/tools/winebuild/winebuild |
| 73 | MAKEDEP = $(TOOLSDIR)/tools/makedep |
| 74 | WRC = $(TOOLSDIR)/tools/wrc/wrc |
| 75 | WMC = $(TOOLSDIR)/tools/wmc/wmc |
Hidenori Takeshima | d48ca94 | 2000-12-22 22:28:00 +0000 | [diff] [blame] | 76 | LDPATH = @LDPATH@ |
Alexandre Julliard | 0adad95 | 2000-01-26 01:45:58 +0000 | [diff] [blame] | 77 | DLLDIR = $(TOPOBJDIR)/dlls |
Alexandre Julliard | b018239 | 2000-12-06 00:04:10 +0000 | [diff] [blame] | 78 | LIBWINE = -L$(TOPOBJDIR)/library -lwine |
| 79 | LIBTSX11 = -L$(TOPOBJDIR)/tsx11 -lwine_tsx11 |
| 80 | LIBUNICODE= -L$(TOPOBJDIR)/unicode -lwine_unicode |
Alexandre Julliard | c4d1176 | 2000-12-27 19:06:44 +0000 | [diff] [blame] | 81 | LIBUUID = -L$(TOPOBJDIR)/ole -lwine_uuid |
Alexandre Julliard | b018239 | 2000-12-06 00:04:10 +0000 | [diff] [blame] | 82 | |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 83 | @SET_MAKE@ |
| 84 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 85 | # Installation infos |
| 86 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 87 | INSTALL = @INSTALL@ $(INSTALL_FLAGS) |
| 88 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(INSTALL_PROGRAM_FLAGS) |
| 89 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ $(INSTALL_SCRIPT_FLAGS) |
| 90 | INSTALL_DATA = @INSTALL_DATA@ $(INSTALL_DATA_FLAGS) |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 91 | prefix = @prefix@ |
| 92 | exec_prefix = @exec_prefix@ |
| 93 | bindir = @bindir@ |
| 94 | libdir = @libdir@ |
Alexandre Julliard | 1d8d017 | 2002-08-02 19:34:21 +0000 | [diff] [blame] | 95 | datadir = @datadir@ |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 96 | infodir = @infodir@ |
Alexandre Julliard | d6baf1b | 1999-07-18 15:47:22 +0000 | [diff] [blame] | 97 | mandir = @mandir@ |
Alexandre Julliard | 9bb05fc | 2002-05-14 18:36:54 +0000 | [diff] [blame] | 98 | sysconfdir = @sysconfdir@ |
| 99 | includedir = @includedir@/wine |
Alexandre Julliard | c1bfca0 | 2002-03-20 22:19:06 +0000 | [diff] [blame] | 100 | dlldir = @libdir@/wine |
Alexandre Julliard | d6baf1b | 1999-07-18 15:47:22 +0000 | [diff] [blame] | 101 | prog_manext = 1 |
| 102 | conf_manext = 5 |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 103 | CLEAN_FILES = *.o *.a *.so *.ln *.$(LIBEXT) \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej \ |
Alexandre Julliard | ad53383 | 2002-05-14 20:54:58 +0000 | [diff] [blame] | 104 | *.flc *.spec.c *.spec.def *.glue.c *.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] | 105 | |
Alexandre Julliard | 526531e | 2002-08-01 18:36:58 +0000 | [diff] [blame] | 106 | OBJS = $(C_SRCS:.c=.o) $(GEN_C_SRCS:.c=.o) $(GEN_ASM_SRCS:.s=.o) $(ASM_SRCS:.S=.o) $(EXTRA_OBJS) |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 107 | |
Steven Edwards | 9138fbb | 2002-07-29 23:28:09 +0000 | [diff] [blame] | 108 | RCOBJS = $(RC_SRCS:.rc=.res.o) |
| 109 | LINTS = $(C_SRCS:.c=.ln) |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 110 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 111 | # Implicit rules |
| 112 | |
Alexandre Julliard | 526531e | 2002-08-01 18:36:58 +0000 | [diff] [blame] | 113 | .SUFFIXES: .mc .rc .mc.rc .res .res.o .spec .spec.c .spec.def .pl .ok |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 114 | |
| 115 | .c.o: |
François Gouget | 1c3a242 | 2001-11-09 19:15:51 +0000 | [diff] [blame] | 116 | $(CC) -c $(ALLCFLAGS) -o $@ $< |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 117 | |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 118 | .s.o: |
François Gouget | 1c3a242 | 2001-11-09 19:15:51 +0000 | [diff] [blame] | 119 | $(AS) -o $@ $< |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 120 | |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 121 | .S.o: |
François Gouget | 1c3a242 | 2001-11-09 19:15:51 +0000 | [diff] [blame] | 122 | $(CC) -c -o $@ $< |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 123 | |
Alexandre Julliard | 017a61e | 2000-11-06 05:30:48 +0000 | [diff] [blame] | 124 | .mc.mc.rc: |
| 125 | $(LDPATH) $(WMC) -i -H /dev/null -o $@ $< |
Alexandre Julliard | f5aee67 | 2000-07-25 17:52:08 +0000 | [diff] [blame] | 126 | |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +0000 | [diff] [blame] | 127 | .rc.res: |
Alexandre Julliard | 017a61e | 2000-11-06 05:30:48 +0000 | [diff] [blame] | 128 | $(LDPATH) $(WRC) $(WRCFLAGS) $(DIVINCL) -o $@ -r $< |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +0000 | [diff] [blame] | 129 | |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 130 | .res.res.o: |
| 131 | $(WINDRES) -i $< -o $@ |
| 132 | |
Ulrich Weigand | 3dff7bb | 1999-07-11 13:58:31 +0000 | [diff] [blame] | 133 | .spec.spec.c: |
Alexandre Julliard | 77afd6c | 2002-06-21 19:15:45 +0000 | [diff] [blame] | 134 | $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -M $(MODULE) -spec $< |
Ulrich Weigand | 3dff7bb | 1999-07-11 13:58:31 +0000 | [diff] [blame] | 135 | |
Dmitry Timoshkov | 93a5b86 | 2002-02-04 18:48:18 +0000 | [diff] [blame] | 136 | .spec.spec.def: |
Alexandre Julliard | ad53383 | 2002-05-14 20:54:58 +0000 | [diff] [blame] | 137 | $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -def $< |
Dmitry Timoshkov | 93a5b86 | 2002-02-04 18:48:18 +0000 | [diff] [blame] | 138 | |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 139 | .c.ln: |
| 140 | $(LINT) -c $(ALLLINTFLAGS) $< || ( $(RM) $@ && exit 1 ) |
| 141 | |
Alexandre Julliard | caa0338 | 2002-02-20 19:03:59 +0000 | [diff] [blame] | 142 | .c.ok: |
Alexandre Julliard | edeee89 | 2002-08-09 01:22:40 +0000 | [diff] [blame] | 143 | $(RUNTEST) $(RUNTESTFLAGS) $< && touch $@ |
Alexandre Julliard | caa0338 | 2002-02-20 19:03:59 +0000 | [diff] [blame] | 144 | |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 145 | .pl.ok: |
Alexandre Julliard | edeee89 | 2002-08-09 01:22:40 +0000 | [diff] [blame] | 146 | $(RUNTEST) $(RUNTESTFLAGS) $< && touch $@ |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 147 | |
Alexandre Julliard | d0edc5f | 2000-03-04 22:31:27 +0000 | [diff] [blame] | 148 | # 'all' target first in case the enclosing Makefile didn't define any target |
| 149 | |
| 150 | all: Makefile |
| 151 | |
Patrik Stridvall | b719029 | 2001-07-29 20:20:13 +0000 | [diff] [blame] | 152 | filter: |
| 153 | @$(TOPSRCDIR)/tools/winapi/make_filter --make $(MAKE) all |
| 154 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 155 | .PHONY: all filter |
| 156 | |
Alexandre Julliard | ad53383 | 2002-05-14 20:54:58 +0000 | [diff] [blame] | 157 | # Rule for main module debug channels |
| 158 | |
| 159 | $(MODULE).dbg.c: $(C_SRCS) $(WINEBUILD) |
| 160 | $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -debug -C$(SRCDIR) $(C_SRCS) |
| 161 | |
Alexandre Julliard | 526531e | 2002-08-01 18:36:58 +0000 | [diff] [blame] | 162 | # Rule for 16-bit glue |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 163 | |
Alexandre Julliard | 526531e | 2002-08-01 18:36:58 +0000 | [diff] [blame] | 164 | $(MODULE).glue.c: $(C_SRCS) $(WINEBUILD) |
| 165 | $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -glue -C$(SRCDIR) $(C_SRCS) |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +0000 | [diff] [blame] | 166 | |
Alexandre Julliard | 526531e | 2002-08-01 18:36:58 +0000 | [diff] [blame] | 167 | # Rule to rebuild the tools |
Bertho Stultiens | 3085591 | 2000-06-13 04:34:41 +0000 | [diff] [blame] | 168 | |
Alexandre Julliard | 526531e | 2002-08-01 18:36:58 +0000 | [diff] [blame] | 169 | $(MAKEDEP) $(WINEBUILD) $(WMC) $(WRC): |
| 170 | cd $(TOOLSDIR)/tools && $(MAKE) `basename $@` |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 171 | |
Alexandre Julliard | e66d421 | 1999-03-14 15:22:29 +0000 | [diff] [blame] | 172 | # Rules for makefile |
| 173 | |
Marcus Meissner | ca004e5 | 1999-01-03 12:26:22 +0000 | [diff] [blame] | 174 | Makefile: Makefile.in $(TOPSRCDIR)/configure |
| 175 | @echo Makefile is older than $?, please rerun $(TOPSRCDIR)/configure |
| 176 | @exit 1 |
| 177 | |
Alexandre Julliard | 829fe32 | 1998-07-26 14:27:39 +0000 | [diff] [blame] | 178 | # Rules for auto documentation |
Alexandre Julliard | 44ed71f | 1997-12-21 19:17:50 +0000 | [diff] [blame] | 179 | |
Francois Gouget | b83bb6d | 2001-08-22 18:01:39 +0000 | [diff] [blame] | 180 | $(SUBDIRS:%=%/__man__): dummy |
| 181 | cd `dirname $@` && $(MAKE) man |
Alexandre Julliard | 829fe32 | 1998-07-26 14:27:39 +0000 | [diff] [blame] | 182 | |
Francois Gouget | b83bb6d | 2001-08-22 18:01:39 +0000 | [diff] [blame] | 183 | man: $(C_SRCS) $(SUBDIRS:%=%/__man__) |
Alexandre Julliard | ce830a9 | 2002-05-09 04:31:39 +0000 | [diff] [blame] | 184 | if [ -n "$(C_SRCS)" ]; then $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/man3w; for i in $(C_SRCS); do $(C2MAN) -L -o $(TOPOBJDIR)/documentation/man3w -S3w $(DIVINCL) -D__WINE__ $(MANSPECS) $$i; done; fi |
Francois Gouget | b83bb6d | 2001-08-22 18:01:39 +0000 | [diff] [blame] | 185 | |
| 186 | $(SUBDIRS:%=%/__doc_html__): dummy |
| 187 | cd `dirname $@` && $(MAKE) doc-html |
| 188 | |
| 189 | doc-html: $(C_SRCS) $(SUBDIRS:%=%/__doc_html__) |
Alexandre Julliard | ce830a9 | 2002-05-09 04:31:39 +0000 | [diff] [blame] | 190 | if [ -n "$(C_SRCS)" ]; then $(MKINSTALLDIRS) $(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] | 191 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 192 | .PHONY: man doc-html $(SUBDIRS:%=%/__man__) $(SUBDIRS:%=%/__doc_html__) |
| 193 | |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 194 | # Rule for linting |
| 195 | |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 196 | $(MODULE).ln : $(LINTS) |
| 197 | if test "$(LINTS)" ; \ |
| 198 | then \ |
| 199 | $(LINT) $(ALLLINTFLAGS) -o$(MODULE) $(LINTS) ; \ |
| 200 | $(MV) llib-l$(MODULE).ln $(MODULE).ln ; \ |
| 201 | else \ |
| 202 | $(LINT) $(ALLLINTFLAGS) -C$(MODULE) /dev/null ; \ |
| 203 | fi |
| 204 | |
| 205 | lint:: $(MODULE).ln |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 206 | |
Patrik Stridvall | 385dc18 | 1999-09-29 10:24:19 +0000 | [diff] [blame] | 207 | # Rules for Windows API checking |
| 208 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 209 | winapi_check:: dummy |
Patrik Stridvall | 385dc18 | 1999-09-29 10:24:19 +0000 | [diff] [blame] | 210 | $(WINAPI_CHECK) $(WINAPI_CHECK_FLAGS) $(WINAPI_CHECK_EXTRA_FLAGS) . |
| 211 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 212 | .PHONY: winapi_check |
| 213 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 214 | # Rules for dependencies |
| 215 | |
| 216 | $(SUBDIRS:%=%/__depend__): $(MAKEDEP) dummy |
| 217 | cd `dirname $@` && $(MAKE) depend |
| 218 | |
Alexandre Julliard | ad53383 | 2002-05-14 20:54:58 +0000 | [diff] [blame] | 219 | depend: $(MAKEDEP) $(SUBDIRS:%=%/__depend__) |
Alexandre Julliard | edeee89 | 2002-08-09 01:22:40 +0000 | [diff] [blame] | 220 | $(MAKEDEP) $(DIVINCL) -C$(SRCDIR) $(C_SRCS) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) $(EXTRA_SRCS) |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 221 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 222 | .PHONY: depend $(SUBDIRS:%=%/__depend__) |
| 223 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 224 | # Rules for cleaning |
| 225 | |
| 226 | $(SUBDIRS:%=%/__clean__): dummy |
| 227 | cd `dirname $@` && $(MAKE) clean |
| 228 | |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 229 | $(SUBDIRS:%=%/__testclean__): dummy |
| 230 | cd `dirname $@` && $(MAKE) testclean |
| 231 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 232 | $(EXTRASUBDIRS:%=%/__clean__): dummy |
| 233 | -cd `dirname $@` && $(RM) $(CLEAN_FILES) |
| 234 | |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 235 | testclean:: $(SUBDIRS:%=%/__testclean__) |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 236 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 237 | clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__) |
Alexandre Julliard | edeee89 | 2002-08-09 01:22:40 +0000 | [diff] [blame] | 238 | $(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] | 239 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 240 | .PHONY: clean testclean $(SUBDIRS:%=%/__clean__) $(SUBDIRS:%=%/__testclean__) $(EXTRASUBDIRS:%=%/__clean__) |
| 241 | |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 242 | # Rules for installing |
| 243 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 244 | $(INSTALLSUBDIRS:%=%/__install__): dummy |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 245 | cd `dirname $@` && $(MAKE) install |
| 246 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 247 | $(INSTALLSUBDIRS:%=%/__uninstall__): dummy |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 248 | cd `dirname $@` && $(MAKE) uninstall |
| 249 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 250 | install:: $(INSTALLSUBDIRS:%=%/__install__) |
| 251 | |
| 252 | uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__) |
| 253 | |
| 254 | .PHONY: install uninstall $(INSTALLSUBDIRS:%=%/__install__) $(INSTALLSUBDIRS:%=%/__uninstall__) |
| 255 | |
Alexandre Julliard | edeee89 | 2002-08-09 01:22:40 +0000 | [diff] [blame] | 256 | # Rules for checking that no imports are missing |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 257 | |
Alexandre Julliard | edeee89 | 2002-08-09 01:22:40 +0000 | [diff] [blame] | 258 | $(SUBDIRS:%=%/__checklink__): dummy |
| 259 | @cd `dirname $@` && $(MAKE) checklink |
| 260 | |
| 261 | .PHONY: checklink $(SUBDIRS:%=%/__checklink__) |
| 262 | |
| 263 | # Rules for testing |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 264 | |
Alexandre Julliard | d7c606d | 2002-04-02 02:58:45 +0000 | [diff] [blame] | 265 | $(SUBDIRS:%=%/__test__): dummy |
| 266 | @cd `dirname $@` && $(MAKE) test |
| 267 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 268 | .PHONY: check test $(SUBDIRS:%=%/__test__) |
| 269 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 270 | # Misc. rules |
| 271 | |
Alexandre Julliard | 7662ea1 | 2001-12-14 23:14:22 +0000 | [diff] [blame] | 272 | $(SPEC_SRCS:.spec=.spec.c): $(WINEBUILD) |
Ulrich Weigand | 3dff7bb | 1999-07-11 13:58:31 +0000 | [diff] [blame] | 273 | |
Alexandre Julliard | cbeb644 | 2000-10-25 20:33:58 +0000 | [diff] [blame] | 274 | $(RC_SRCS:.rc=.res): $(WRC) |
Alexandre Julliard | d0edc5f | 2000-03-04 22:31:27 +0000 | [diff] [blame] | 275 | |
Dmitry Timoshkov | db79045 | 2001-05-31 21:37:29 +0000 | [diff] [blame] | 276 | $(RC_SRCS16:.rc=.res): $(WRC) |
| 277 | |
Alexandre Julliard | 017a61e | 2000-11-06 05:30:48 +0000 | [diff] [blame] | 278 | $(MC_SRCS:.mc=.mc.rc): $(WMC) |
Alexandre Julliard | f5aee67 | 2000-07-25 17:52:08 +0000 | [diff] [blame] | 279 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 280 | $(SUBDIRS): dummy |
| 281 | @cd $@ && $(MAKE) |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 282 | |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 283 | dummy: |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 284 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 285 | .PHONY: dummy $(SUBDIRS) |
| 286 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 287 | # End of global rules |