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 |
| 19 | # WRCEXTRA : extra wrc flags (e.g. '-p _SysRes') |
| 20 | # SUBDIRS : subdirectories that contain a Makefile |
| 21 | # EXTRASUBDIRS : subdirectories that do not contain a Makefile |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 22 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 23 | # First some useful definitions |
| 24 | |
Alexandre Julliard | 8664b89 | 1996-04-05 14:58:24 +0000 | [diff] [blame] | 25 | SHELL = /bin/sh |
| 26 | CC = @CC@ |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 27 | CPP = @CPP@ |
Alexandre Julliard | 18f92e7 | 1996-07-17 20:02:21 +0000 | [diff] [blame] | 28 | CFLAGS = @CFLAGS@ |
Alexandre Julliard | 0623a6f | 1998-01-18 18:01:49 +0000 | [diff] [blame] | 29 | OPTIONS = @OPTIONS@ -D_REENTRANT |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 30 | X_CFLAGS = @X_CFLAGS@ |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 31 | X_LIBS = @X_LIBS@ |
Patrik Stridvall | ea58472 | 1998-11-01 16:22:07 +0000 | [diff] [blame] | 32 | XLIB = @X_PRE_LIBS@ @XLIB@ @X_EXTRA_LIBS@ |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 33 | DLL_LINK = @DLL_LINK@ |
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 | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 38 | RANLIB = @RANLIB@ |
| 39 | LN_S = @LN_S@ |
Alexandre Julliard | 5166237 | 1999-05-15 10:41:15 +0000 | [diff] [blame] | 40 | DIVINCL = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include |
Marcus Meissner | d43eb2d | 2000-01-08 22:23:43 +0000 | [diff] [blame] | 41 | ALLCFLAGS = $(DIVINCL) $(CFLAGS) $(DEFS) $(OPTIONS) $(X_CFLAGS) |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 42 | LDCOMBINE = ld -r |
Marcus Meissner | a387aa4 | 2000-09-26 23:09:47 +0000 | [diff] [blame] | 43 | LDFLAGS = @LDFLAGS@ |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 44 | AR = ar rc |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 45 | RM = rm -f |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 46 | MV = mv |
Alexandre Julliard | 829fe32 | 1998-07-26 14:27:39 +0000 | [diff] [blame] | 47 | MKDIR = mkdir -p |
Alexandre Julliard | c7c217b | 1998-04-13 12:21:30 +0000 | [diff] [blame] | 48 | C2MAN = @C2MAN@ |
Mike McCormack | 4306eaa | 2000-07-23 19:27:00 +0000 | [diff] [blame] | 49 | MANSPECS = -w $(TOPSRCDIR)/dlls/gdi/gdi32.spec \ |
| 50 | -w $(TOPSRCDIR)/dlls/user/user32.spec \ |
| 51 | -w $(TOPSRCDIR)/dlls/comctl32/comctl32.spec \ |
| 52 | -w $(TOPSRCDIR)/dlls/comdlg32/comdlg32.spec \ |
| 53 | -w $(TOPSRCDIR)/dlls/kernel/kernel32.spec |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 54 | LINT = @LINT@ |
| 55 | LINTFLAGS = @LINTFLAGS@ |
| 56 | ALLLINTFLAGS = $(LINTFLAGS) $(DEFS) $(OPTIONS) $(DIVINCL) |
Patrik Stridvall | 385dc18 | 1999-09-29 10:24:19 +0000 | [diff] [blame] | 57 | WINAPI_CHECK = $(TOPSRCDIR)/tools/winapi_check/winapi_check |
Alexandre Julliard | e482eeb | 2000-06-23 20:15:35 +0000 | [diff] [blame] | 58 | BUILD = $(TOPOBJDIR)/tools/winebuild/winebuild |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 59 | MAKEDEP = $(TOPOBJDIR)/tools/makedep |
| 60 | WRC = $(TOPOBJDIR)/tools/wrc/wrc |
Alexandre Julliard | 01e819a | 2000-06-08 04:52:11 +0000 | [diff] [blame] | 61 | WRCFLAGS = -c -s -p $* |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 62 | WMC = $(TOPOBJDIR)/tools/wmc/wmc |
Alexandre Julliard | 0adad95 | 2000-01-26 01:45:58 +0000 | [diff] [blame] | 63 | DLLDIR = $(TOPOBJDIR)/dlls |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 64 | @SET_MAKE@ |
| 65 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 66 | # Installation infos |
| 67 | |
| 68 | INSTALL = @INSTALL@ |
| 69 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
| 70 | INSTALL_DATA = @INSTALL_DATA@ |
| 71 | prefix = @prefix@ |
| 72 | exec_prefix = @exec_prefix@ |
| 73 | bindir = @bindir@ |
| 74 | libdir = @libdir@ |
| 75 | infodir = @infodir@ |
Alexandre Julliard | d6baf1b | 1999-07-18 15:47:22 +0000 | [diff] [blame] | 76 | mandir = @mandir@ |
| 77 | prog_manext = 1 |
| 78 | conf_manext = 5 |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 79 | includedir = @includedir@/wine |
Alexandre Julliard | 24c3c5e | 2000-05-24 03:31:04 +0000 | [diff] [blame] | 80 | CLEAN_FILES = *.o *.a *.so *.ln \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej \ |
| 81 | *.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] | 82 | |
Alexandre Julliard | 24c3c5e | 2000-05-24 03:31:04 +0000 | [diff] [blame] | 83 | OBJS = $(SPEC_SRCS:.spec=.spec.o) $(C_SRCS:.c=.o) $(GEN_C_SRCS:.c=.o) $(GEN_ASM_SRCS:.s=.o) \ |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 84 | $(ASM_SRCS:.S=.o) $(RC_SRCS:.rc=.o) $(GLUE:.c=.glue.o) $(EXTRA_OBJS) |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 85 | |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 86 | LINTS = $(C_SRCS:.c=.ln) |
| 87 | |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 88 | # DLL list |
| 89 | |
Patrik Stridvall | 2941a21 | 2000-04-25 20:34:22 +0000 | [diff] [blame] | 90 | X_DLLS = \ |
| 91 | ddraw \ |
Hidenori Takeshima | 4615e29 | 2000-05-23 23:36:41 +0000 | [diff] [blame] | 92 | @OPENGL32_DLL@ \ |
Patrik Stridvall | 2941a21 | 2000-04-25 20:34:22 +0000 | [diff] [blame] | 93 | x11drv |
| 94 | |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 95 | DLLS = \ |
Patrik Stridvall | 2941a21 | 2000-04-25 20:34:22 +0000 | [diff] [blame] | 96 | @X_DLLS@ \ |
Alexandre Julliard | cd770ea | 2000-07-25 15:10:52 +0000 | [diff] [blame] | 97 | advapi32 \ |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 98 | avifil32 \ |
| 99 | comctl32 \ |
| 100 | comdlg32 \ |
Alexandre Julliard | 4f356e8 | 2000-06-23 16:16:30 +0000 | [diff] [blame] | 101 | crtdll \ |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 102 | dciman32 \ |
Alexandre Julliard | ddce652 | 2000-03-17 16:58:10 +0000 | [diff] [blame] | 103 | dinput \ |
Alexandre Julliard | c607532 | 2000-07-09 11:19:35 +0000 | [diff] [blame] | 104 | dplay \ |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 105 | dplayx \ |
| 106 | dsound \ |
Alexandre Julliard | 1dac57f | 2000-03-19 12:08:09 +0000 | [diff] [blame] | 107 | gdi32 \ |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 108 | icmp \ |
| 109 | imagehlp \ |
| 110 | imm32 \ |
Eric Pouech | 2a3b0a1 | 2000-02-26 13:14:04 +0000 | [diff] [blame] | 111 | joystick.drv \ |
Dimitrie O. Paun | 36b5b6b | 2000-06-03 00:07:44 +0000 | [diff] [blame] | 112 | kernel32 \ |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 113 | lz32 \ |
| 114 | mcianim.drv \ |
| 115 | mciavi.drv \ |
| 116 | mcicda.drv \ |
| 117 | mciseq.drv \ |
| 118 | mciwave.drv \ |
| 119 | midimap.drv \ |
Alexandre Julliard | ebc3225 | 2000-03-17 15:09:48 +0000 | [diff] [blame] | 120 | mpr \ |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 121 | msacm.drv \ |
| 122 | msacm32 \ |
| 123 | msnet32 \ |
| 124 | msvfw32 \ |
| 125 | odbc32 \ |
| 126 | ole32 \ |
| 127 | oleaut32 \ |
| 128 | olecli32 \ |
| 129 | oledlg \ |
Sean Langley | 58c71d4 | 2000-02-07 16:26:56 +0000 | [diff] [blame] | 130 | olepro32 \ |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 131 | olesvr32 \ |
| 132 | psapi \ |
| 133 | rasapi32 \ |
Hidenori Takeshima | e75f9fb | 2000-05-03 18:12:19 +0000 | [diff] [blame] | 134 | riched32 \ |
Huw D M Davies | 10b1b23 | 2000-07-15 19:53:50 +0000 | [diff] [blame] | 135 | rpcrt4 \ |
Mike McCormack | dc2461e | 2000-07-15 21:35:55 +0000 | [diff] [blame] | 136 | serialui \ |
Francois Jacques | df5e579 | 2000-07-08 18:27:03 +0000 | [diff] [blame] | 137 | setupapi \ |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 138 | shell32 \ |
Alexandre Julliard | c607532 | 2000-07-09 11:19:35 +0000 | [diff] [blame] | 139 | shfolder \ |
| 140 | shlwapi \ |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 141 | tapi32 \ |
Alexandre Julliard | 1dac57f | 2000-03-19 12:08:09 +0000 | [diff] [blame] | 142 | ttydrv \ |
Alexandre Julliard | 819fa8c | 2000-04-11 20:07:00 +0000 | [diff] [blame] | 143 | urlmon \ |
Alexandre Julliard | 1dac57f | 2000-03-19 12:08:09 +0000 | [diff] [blame] | 144 | user32 \ |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 145 | version \ |
Alexandre Julliard | 7ee3435 | 2000-02-29 22:11:44 +0000 | [diff] [blame] | 146 | w32skrnl \ |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 147 | wineoss.drv \ |
Dimitrie O. Paun | 84bde6a | 2000-05-30 20:27:23 +0000 | [diff] [blame] | 148 | wineps \ |
Alexandre Julliard | 819fa8c | 2000-04-11 20:07:00 +0000 | [diff] [blame] | 149 | wininet \ |
Alexandre Julliard | e1d7889 | 2000-02-26 13:45:34 +0000 | [diff] [blame] | 150 | winmm \ |
Eric Pouech | 44af98c | 2000-04-25 19:57:27 +0000 | [diff] [blame] | 151 | winspool.drv \ |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 152 | wnaspi32 \ |
Alexandre Julliard | c607532 | 2000-07-09 11:19:35 +0000 | [diff] [blame] | 153 | wow32 \ |
| 154 | ws2_32 \ |
Patrik Stridvall | 2941a21 | 2000-04-25 20:34:22 +0000 | [diff] [blame] | 155 | wsock32 |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 156 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 157 | # Implicit rules |
| 158 | |
Alexandre Julliard | f5aee67 | 2000-07-25 17:52:08 +0000 | [diff] [blame] | 159 | .SUFFIXES: .mc .rc .res .spec .spec.c .spec.o .glue.c |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 160 | |
| 161 | .c.o: |
| 162 | $(CC) -c $(ALLCFLAGS) -o $*.o $< |
| 163 | |
Patrik Stridvall | 0691a59 | 1999-07-31 14:45:22 +0000 | [diff] [blame] | 164 | .spec.c.spec.o: |
| 165 | $(CC) -c $(ALLCFLAGS) @GCC_NO_BUILTIN@ -o $*.spec.o $< |
| 166 | |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 167 | .s.o: |
Patrik Stridvall | 1439f72 | 1998-10-11 17:12:21 +0000 | [diff] [blame] | 168 | $(AS) -o $*.o $< |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 169 | |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 170 | .S.o: |
| 171 | $(CC) -c -o $*.o $< |
| 172 | |
Alexandre Julliard | f5aee67 | 2000-07-25 17:52:08 +0000 | [diff] [blame] | 173 | .mc.rc: |
Alexandre Julliard | 7e495e1 | 2000-07-25 21:01:59 +0000 | [diff] [blame] | 174 | LD_LIBRARY_PATH="$(TOPOBJDIR):$$LD_LIBRARY_PATH" $(WMC) -i -H /dev/null -o $@ $< |
Alexandre Julliard | f5aee67 | 2000-07-25 17:52:08 +0000 | [diff] [blame] | 175 | |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +0000 | [diff] [blame] | 176 | .rc.s: |
| 177 | $(WRC) $(WRCFLAGS) $(WRCEXTRA) $(DIVINCL) $< |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 178 | |
| 179 | .rc.h: |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +0000 | [diff] [blame] | 180 | $(WRC) $(WRCFLAGS) $(WRCEXTRA) $(DIVINCL) -nh $< |
| 181 | |
| 182 | .rc.res: |
| 183 | $(WRC) $(WRCFLAGS) $(WRCEXTRA) $(DIVINCL) -r $< |
| 184 | |
| 185 | .res.s: |
| 186 | $(WRC) $(WRCFLAGS) $(WRCEXTRA) -b $< |
| 187 | |
| 188 | .res.h: |
| 189 | $(WRC) $(WRCFLAGS) $(WRCEXTRA) -bnh $< |
| 190 | |
Ulrich Weigand | 3dff7bb | 1999-07-11 13:58:31 +0000 | [diff] [blame] | 191 | .spec.spec.c: |
Alexandre Julliard | e482eeb | 2000-06-23 20:15:35 +0000 | [diff] [blame] | 192 | $(BUILD) @DLLFLAGS@ -o $@ -spec $< |
Ulrich Weigand | 3dff7bb | 1999-07-11 13:58:31 +0000 | [diff] [blame] | 193 | |
Ulrich Weigand | 8336cc9 | 1999-08-15 12:45:53 +0000 | [diff] [blame] | 194 | .c.glue.c: |
Alexandre Julliard | e482eeb | 2000-06-23 20:15:35 +0000 | [diff] [blame] | 195 | $(BUILD) @DLLFLAGS@ -o $@ -glue $< |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 196 | |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 197 | .c.ln: |
| 198 | $(LINT) -c $(ALLLINTFLAGS) $< || ( $(RM) $@ && exit 1 ) |
| 199 | |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 200 | .PHONY: all install uninstall clean distclean depend dummy |
| 201 | |
Alexandre Julliard | d0edc5f | 2000-03-04 22:31:27 +0000 | [diff] [blame] | 202 | # 'all' target first in case the enclosing Makefile didn't define any target |
| 203 | |
| 204 | all: Makefile |
| 205 | |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +0000 | [diff] [blame] | 206 | # Rule to rebuild the resource compiler |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 207 | |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +0000 | [diff] [blame] | 208 | $(WRC) check_wrc: |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 209 | cd $(TOPOBJDIR)/tools/wrc && $(MAKE) wrc |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +0000 | [diff] [blame] | 210 | |
Bertho Stultiens | 3085591 | 2000-06-13 04:34:41 +0000 | [diff] [blame] | 211 | # Rule to rebuild the message compiler |
| 212 | |
| 213 | $(WMC) check_wmc: |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 214 | cd $(TOPOBJDIR)/tools/wmc && $(MAKE) wmc |
Bertho Stultiens | 3085591 | 2000-06-13 04:34:41 +0000 | [diff] [blame] | 215 | |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 216 | # Rule to rebuild the 'makedep' program |
Alexandre Julliard | 530ee84 | 1996-10-23 16:59:13 +0000 | [diff] [blame] | 217 | |
| 218 | $(MAKEDEP) check_makedep: |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 219 | cd $(TOPOBJDIR)/tools && $(MAKE) makedep |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 220 | |
Alexandre Julliard | e482eeb | 2000-06-23 20:15:35 +0000 | [diff] [blame] | 221 | # Rule to rebuild the 'winebuild' program |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 222 | |
Alexandre Julliard | e482eeb | 2000-06-23 20:15:35 +0000 | [diff] [blame] | 223 | $(BUILD) check_winebuild: |
| 224 | cd $(TOPOBJDIR)/tools/winebuild && $(MAKE) winebuild |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 225 | |
Alexandre Julliard | e66d421 | 1999-03-14 15:22:29 +0000 | [diff] [blame] | 226 | # Rules for makefile |
| 227 | |
Marcus Meissner | ca004e5 | 1999-01-03 12:26:22 +0000 | [diff] [blame] | 228 | Makefile: Makefile.in $(TOPSRCDIR)/configure |
| 229 | @echo Makefile is older than $?, please rerun $(TOPSRCDIR)/configure |
| 230 | @exit 1 |
| 231 | |
Alexandre Julliard | 829fe32 | 1998-07-26 14:27:39 +0000 | [diff] [blame] | 232 | # Rules for auto documentation |
Alexandre Julliard | 44ed71f | 1997-12-21 19:17:50 +0000 | [diff] [blame] | 233 | |
| 234 | man: $(C_SRCS) |
Alexandre Julliard | 829fe32 | 1998-07-26 14:27:39 +0000 | [diff] [blame] | 235 | for i in $(C_SRCS); do $(C2MAN) -L -o $(TOPOBJDIR)/documentation/man3w -S3w $(DIVINCL) -D__WINE__ $(MANSPECS) $$i; done |
| 236 | |
John R. Sheets | 1e8e5ba | 2000-08-08 01:24:00 +0000 | [diff] [blame] | 237 | doc-html: $(C_SRCS) |
Alexandre Julliard | 829fe32 | 1998-07-26 14:27:39 +0000 | [diff] [blame] | 238 | for i in $(C_SRCS); do $(C2MAN) -L -o $(TOPOBJDIR)/documentation/html -Th -iwindows.h $(DIVINCL) -D__WINE__ $(MANSPECS) $$i; done |
| 239 | |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 240 | # Rule for linting |
| 241 | |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 242 | $(MODULE).ln : $(LINTS) |
| 243 | if test "$(LINTS)" ; \ |
| 244 | then \ |
| 245 | $(LINT) $(ALLLINTFLAGS) -o$(MODULE) $(LINTS) ; \ |
| 246 | $(MV) llib-l$(MODULE).ln $(MODULE).ln ; \ |
| 247 | else \ |
| 248 | $(LINT) $(ALLLINTFLAGS) -C$(MODULE) /dev/null ; \ |
| 249 | fi |
| 250 | |
| 251 | lint:: $(MODULE).ln |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 252 | |
Patrik Stridvall | 385dc18 | 1999-09-29 10:24:19 +0000 | [diff] [blame] | 253 | # Rules for Windows API checking |
| 254 | |
| 255 | winapi_check:: |
| 256 | $(WINAPI_CHECK) $(WINAPI_CHECK_FLAGS) $(WINAPI_CHECK_EXTRA_FLAGS) . |
| 257 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 258 | # Rules for dependencies |
| 259 | |
| 260 | $(SUBDIRS:%=%/__depend__): $(MAKEDEP) dummy |
| 261 | cd `dirname $@` && $(MAKE) depend |
| 262 | |
Alexandre Julliard | 24c3c5e | 2000-05-24 03:31:04 +0000 | [diff] [blame] | 263 | depend: $(MAKEDEP) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS) $(GEN_C_SRCS) $(SUBDIRS:%=%/__depend__) |
| 264 | $(MAKEDEP) $(DIVINCL) -C$(SRCDIR) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS) -C. $(GEN_C_SRCS) |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 265 | |
| 266 | # Rules for cleaning |
| 267 | |
| 268 | $(SUBDIRS:%=%/__clean__): dummy |
| 269 | cd `dirname $@` && $(MAKE) clean |
| 270 | |
| 271 | $(EXTRASUBDIRS:%=%/__clean__): dummy |
| 272 | -cd `dirname $@` && $(RM) $(CLEAN_FILES) |
| 273 | |
| 274 | clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__) |
Alexandre Julliard | f5aee67 | 2000-07-25 17:52:08 +0000 | [diff] [blame] | 275 | $(RM) $(CLEAN_FILES) $(GEN_C_SRCS) $(GEN_ASM_SRCS) $(RC_SRCS:.rc=.s) $(RC_SRCS:.rc=.h) $(MC_SRCS:.mc=.rc) $(PROGRAMS) |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 276 | |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 277 | # Rules for installing |
| 278 | |
| 279 | $(SUBDIRS:%=%/__install__): dummy |
| 280 | cd `dirname $@` && $(MAKE) install |
| 281 | |
| 282 | $(SUBDIRS:%=%/__uninstall__): dummy |
| 283 | cd `dirname $@` && $(MAKE) uninstall |
| 284 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 285 | # Misc. rules |
| 286 | |
Alexandre Julliard | c585a50 | 2000-09-27 23:40:43 +0000 | [diff] [blame] | 287 | $(SPEC_SRCS:.spec=.spec.c): $(BUILD) $(TOPSRCDIR)/include/builtin16.h |
Ulrich Weigand | 3dff7bb | 1999-07-11 13:58:31 +0000 | [diff] [blame] | 288 | |
Alexandre Julliard | c585a50 | 2000-09-27 23:40:43 +0000 | [diff] [blame] | 289 | $(GLUE:.c=.glue.c): $(BUILD) $(TOPSRCDIR)/include/builtin16.h |
Ulrich Weigand | 3dff7bb | 1999-07-11 13:58:31 +0000 | [diff] [blame] | 290 | |
Alexandre Julliard | d0edc5f | 2000-03-04 22:31:27 +0000 | [diff] [blame] | 291 | $(RC_SRCS:.rc=.s): $(WRC) |
| 292 | |
Alexandre Julliard | f5aee67 | 2000-07-25 17:52:08 +0000 | [diff] [blame] | 293 | $(MC_SRCS:.mc=.rc): $(WMC) |
| 294 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 295 | $(SUBDIRS): dummy |
| 296 | @cd $@ && $(MAKE) |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 297 | |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 298 | dummy: |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 299 | |
| 300 | # End of global rules |