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