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 |
Mike McCormack | b744372 | 2005-08-11 17:12:18 +0000 | [diff] [blame] | 20 | # MODCFLAGS : extra CFLAGS for this module |
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 | 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@ |
Mike McCormack | c068f67 | 2004-03-16 03:11:39 +0000 | [diff] [blame] | 29 | BISON = @BISON@ |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 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 | adbb098 | 2005-08-09 11:12:29 +0000 | [diff] [blame] | 50 | PRELINK = @PRELINK@ |
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@ |
Huw Davies | 00acb5f | 2004-08-17 22:33:14 +0000 | [diff] [blame] | 55 | FONTFORGE = @FONTFORGE@ |
Alexandre Julliard | fc09423 | 2003-04-14 21:46:41 +0000 | [diff] [blame] | 56 | INCLUDES = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL) |
| 57 | EXTRACFLAGS = @EXTRACFLAGS@ |
Mike McCormack | b744372 | 2005-08-11 17:12:18 +0000 | [diff] [blame] | 58 | ALLCFLAGS = $(INCLUDES) $(DEFS) $(DLLFLAGS) $(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) $(MODCFLAGS) |
Alexandre Julliard | fc09423 | 2003-04-14 21:46:41 +0000 | [diff] [blame] | 59 | ALLLINTFLAGS = $(INCLUDES) $(DEFS) $(LINTFLAGS) |
Alexandre Julliard | 16cd861 | 2003-09-24 19:01:44 +0000 | [diff] [blame] | 60 | IDLFLAGS = $(INCLUDES) $(DEFS) $(EXTRAIDLFLAGS) |
Alexandre Julliard | 5cb97d8 | 2005-09-21 14:23:54 +0000 | [diff] [blame] | 61 | WINEBUILDFLAGS = $(DLLFLAGS) --as-cmd "$(AS)" |
Alexandre Julliard | fc09423 | 2003-04-14 21:46:41 +0000 | [diff] [blame] | 62 | MKINSTALLDIRS= $(TOPSRCDIR)/tools/mkinstalldirs -m 755 |
Hans Leidekker | a764450 | 2005-05-04 09:55:17 +0000 | [diff] [blame] | 63 | WINAPI_CHECK = $(TOPSRCDIR)/tools/winapi/winapi_check |
Alexandre Julliard | 3536316 | 2002-05-22 21:32:49 +0000 | [diff] [blame] | 64 | WINEWRAPPER = $(TOPSRCDIR)/tools/winewrapper |
Richard Cohen | 6039fb0 | 2003-07-21 22:01:07 +0000 | [diff] [blame] | 65 | C2MAN = $(TOPSRCDIR)/tools/c2man.pl |
Dimitrie O. Paun | e39e8a1 | 2002-11-11 20:25:54 +0000 | [diff] [blame] | 66 | RUNTEST = $(TOPSRCDIR)/tools/runtest |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 67 | WINEBUILD = $(TOOLSDIR)/tools/winebuild/winebuild |
| 68 | MAKEDEP = $(TOOLSDIR)/tools/makedep |
Alexandre Julliard | bcb7591 | 2005-03-16 20:02:17 +0000 | [diff] [blame] | 69 | MAKECTESTS = $(TOOLSDIR)/tools/make_ctests |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 70 | WRC = $(TOOLSDIR)/tools/wrc/wrc |
Dimitrie O. Paun | 54e6b0d | 2003-10-03 05:01:33 +0000 | [diff] [blame] | 71 | BIN2RES = $(TOOLSDIR)/tools/bin2res |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 72 | WMC = $(TOOLSDIR)/tools/wmc/wmc |
Alexandre Julliard | ed2f8fc | 2002-12-03 23:36:05 +0000 | [diff] [blame] | 73 | WIDL = $(TOOLSDIR)/tools/widl/widl |
Alexandre Julliard | ccc3d66 | 2004-03-02 06:58:21 +0000 | [diff] [blame] | 74 | WINEGCC = $(TOOLSDIR)/tools/winegcc/winegcc |
Huw Davies | 00acb5f | 2004-08-17 22:33:14 +0000 | [diff] [blame] | 75 | SFNT2FNT = $(TOOLSDIR)/tools/sfnt2fnt |
| 76 | FNT2FON = $(TOOLSDIR)/tools/fnt2fon |
Dimitrie O. Paun | 1a1f9bf | 2003-05-06 18:34:53 +0000 | [diff] [blame] | 77 | RC = $(WRC) |
| 78 | RC16 = $(WRC) |
Alexandre Julliard | 49b9c76 | 2003-12-13 03:19:34 +0000 | [diff] [blame] | 79 | RCFLAGS = --nostdinc $(INCLUDES) $(DEFS) $(EXTRARCFLAGS) |
Dimitrie O. Paun | 1a1f9bf | 2003-05-06 18:34:53 +0000 | [diff] [blame] | 80 | RC16FLAGS = -O res16 $(RCFLAGS) |
Alexandre Julliard | 2a93f85 | 2002-12-11 01:34:51 +0000 | [diff] [blame] | 81 | LDPATH = @LDPATH@ |
| 82 | DLLDIR = $(TOPOBJDIR)/dlls |
Alexandre Julliard | e1a9b10 | 2003-05-01 03:16:21 +0000 | [diff] [blame] | 83 | LIBDIR = $(TOPOBJDIR)/libs |
Alexandre Julliard | 6a9fe36 | 2003-03-19 22:09:16 +0000 | [diff] [blame] | 84 | LIBPORT = -L$(TOPOBJDIR)/libs/port -lwine_port |
Alexandre Julliard | 7ab9a71 | 2003-03-21 05:06:48 +0000 | [diff] [blame] | 85 | LIBUNICODE = -L$(TOPOBJDIR)/libs/unicode -lwine_unicode |
Alexandre Julliard | 2d1c790 | 2003-03-22 20:40:48 +0000 | [diff] [blame] | 86 | LIBWINE = -L$(TOPOBJDIR)/libs/wine -lwine |
Alexandre Julliard | b018239 | 2000-12-06 00:04:10 +0000 | [diff] [blame] | 87 | |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 88 | @SET_MAKE@ |
| 89 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 90 | # Installation infos |
| 91 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 92 | INSTALL = @INSTALL@ $(INSTALL_FLAGS) |
| 93 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(INSTALL_PROGRAM_FLAGS) |
| 94 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ $(INSTALL_SCRIPT_FLAGS) |
| 95 | INSTALL_DATA = @INSTALL_DATA@ $(INSTALL_DATA_FLAGS) |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 96 | prefix = @prefix@ |
| 97 | exec_prefix = @exec_prefix@ |
| 98 | bindir = @bindir@ |
| 99 | libdir = @libdir@ |
Alexandre Julliard | 1d8d017 | 2002-08-02 19:34:21 +0000 | [diff] [blame] | 100 | datadir = @datadir@ |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 101 | infodir = @infodir@ |
Alexandre Julliard | d6baf1b | 1999-07-18 15:47:22 +0000 | [diff] [blame] | 102 | mandir = @mandir@ |
Alexandre Julliard | 9bb05fc | 2002-05-14 18:36:54 +0000 | [diff] [blame] | 103 | sysconfdir = @sysconfdir@ |
| 104 | includedir = @includedir@/wine |
Alexandre Julliard | c1bfca0 | 2002-03-20 22:19:06 +0000 | [diff] [blame] | 105 | dlldir = @libdir@/wine |
Alexandre Julliard | d6baf1b | 1999-07-18 15:47:22 +0000 | [diff] [blame] | 106 | prog_manext = 1 |
Jon Griffiths | 35345f2 | 2003-03-15 19:48:34 +0000 | [diff] [blame] | 107 | api_manext = 3w |
Alexandre Julliard | d6baf1b | 1999-07-18 15:47:22 +0000 | [diff] [blame] | 108 | conf_manext = 5 |
Alexandre Julliard | 382dba6 | 2005-02-01 14:37:36 +0000 | [diff] [blame] | 109 | CLEAN_FILES = *.o *.a *.so *.ln *.$(LIBEXT) \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej \ |
Alexandre Julliard | 7ddab75 | 2005-09-28 18:34:00 +0000 | [diff] [blame] | 110 | *.flc *.tab.c *.tab.h @LEX_OUTPUT_ROOT@.c core |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 111 | |
Alexandre Julliard | c728efc | 2002-10-02 02:34:09 +0000 | [diff] [blame] | 112 | OBJS = $(C_SRCS:.c=.o) $(EXTRA_OBJS) |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 113 | |
Steven Edwards | 9138fbb | 2002-07-29 23:28:09 +0000 | [diff] [blame] | 114 | RCOBJS = $(RC_SRCS:.rc=.res.o) |
| 115 | LINTS = $(C_SRCS:.c=.ln) |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 116 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 117 | # Implicit rules |
| 118 | |
Alexandre Julliard | 664e410 | 2005-10-06 16:06:04 +0000 | [diff] [blame] | 119 | .SUFFIXES: .mc .rc .mc.rc .res .res.o .spec .spec.o .idl .tlb .h .ok .sfd .ttf .man.in .man |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 120 | |
| 121 | .c.o: |
François Gouget | 1c3a242 | 2001-11-09 19:15:51 +0000 | [diff] [blame] | 122 | $(CC) -c $(ALLCFLAGS) -o $@ $< |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 123 | |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 124 | .s.o: |
François Gouget | 1c3a242 | 2001-11-09 19:15:51 +0000 | [diff] [blame] | 125 | $(AS) -o $@ $< |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 126 | |
Alexandre Julliard | 017a61e | 2000-11-06 05:30:48 +0000 | [diff] [blame] | 127 | .mc.mc.rc: |
Martin Fuchs | 3f44167 | 2002-10-19 17:15:00 +0000 | [diff] [blame] | 128 | $(LDPATH) $(WMC) -i -U -H /dev/null -o $@ $< |
Alexandre Julliard | f5aee67 | 2000-07-25 17:52:08 +0000 | [diff] [blame] | 129 | |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +0000 | [diff] [blame] | 130 | .rc.res: |
Dimitrie O. Paun | 1a1f9bf | 2003-05-06 18:34:53 +0000 | [diff] [blame] | 131 | $(LDPATH) $(RC) $(RCFLAGS) -fo$@ $< |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +0000 | [diff] [blame] | 132 | |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 133 | .res.res.o: |
| 134 | $(WINDRES) -i $< -o $@ |
| 135 | |
Alexandre Julliard | 5cb97d8 | 2005-09-21 14:23:54 +0000 | [diff] [blame] | 136 | .spec.spec.o: |
| 137 | $(WINEBUILD) $(WINEBUILDFLAGS) --dll -o $@ --main-module $(MODULE) --export $< |
Ulrich Weigand | 3dff7bb | 1999-07-11 13:58:31 +0000 | [diff] [blame] | 138 | |
Alexandre Julliard | 233766a | 2004-09-20 21:48:42 +0000 | [diff] [blame] | 139 | .idl.h: |
Alexandre Julliard | d062924 | 2004-10-05 04:44:20 +0000 | [diff] [blame] | 140 | $(WIDL) $(IDLFLAGS) -h -H $@ $< |
Alexandre Julliard | 233766a | 2004-09-20 21:48:42 +0000 | [diff] [blame] | 141 | |
Huw Davies | 4046846 | 2005-01-28 14:13:08 +0000 | [diff] [blame] | 142 | .idl.tlb: |
| 143 | $(WIDL) $(IDLFLAGS) -t -T $@ $< |
| 144 | |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 145 | .c.ln: |
| 146 | $(LINT) -c $(ALLLINTFLAGS) $< || ( $(RM) $@ && exit 1 ) |
| 147 | |
Alexandre Julliard | caa0338 | 2002-02-20 19:03:59 +0000 | [diff] [blame] | 148 | .c.ok: |
Alexandre Julliard | edeee89 | 2002-08-09 01:22:40 +0000 | [diff] [blame] | 149 | $(RUNTEST) $(RUNTESTFLAGS) $< && touch $@ |
Alexandre Julliard | caa0338 | 2002-02-20 19:03:59 +0000 | [diff] [blame] | 150 | |
Huw Davies | 00acb5f | 2004-08-17 22:33:14 +0000 | [diff] [blame] | 151 | .sfd.ttf: |
Robert Shearman | 8b00c3d | 2005-07-20 17:48:26 +0000 | [diff] [blame] | 152 | $(FONTFORGE) -script $(TOPSRCDIR)/fonts/genttf.ff $< $@ |
Huw Davies | 00acb5f | 2004-08-17 22:33:14 +0000 | [diff] [blame] | 153 | |
Alexandre Julliard | 664e410 | 2005-10-06 16:06:04 +0000 | [diff] [blame] | 154 | .man.in.man: |
| 155 | sed -e 's,@bindir\@,$(bindir),g' -e 's,@dlldir\@,$(dlldir),g' -e 's,@PACKAGE_STRING\@,@PACKAGE_STRING@,g' $< >$@ || ($(RM) $@ && false) |
| 156 | |
Alexandre Julliard | d0edc5f | 2000-03-04 22:31:27 +0000 | [diff] [blame] | 157 | # 'all' target first in case the enclosing Makefile didn't define any target |
| 158 | |
| 159 | all: Makefile |
| 160 | |
Patrik Stridvall | b719029 | 2001-07-29 20:20:13 +0000 | [diff] [blame] | 161 | filter: |
| 162 | @$(TOPSRCDIR)/tools/winapi/make_filter --make $(MAKE) all |
| 163 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 164 | .PHONY: all filter |
| 165 | |
Dimitrie O. Paun | 54e6b0d | 2003-10-03 05:01:33 +0000 | [diff] [blame] | 166 | # Rules for resources |
| 167 | |
| 168 | $(RC_BINARIES): $(BIN2RES) $(RC_BINSRC) |
| 169 | $(BIN2RES) -f -o $@ $(SRCDIR)/$(RC_BINSRC) |
| 170 | |
Huw Davies | 4046846 | 2005-01-28 14:13:08 +0000 | [diff] [blame] | 171 | $(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res): $(WRC) $(RC_BINARIES) $(RC_TLB) |
Dimitrie O. Paun | 54e6b0d | 2003-10-03 05:01:33 +0000 | [diff] [blame] | 172 | |
Alexandre Julliard | e66d421 | 1999-03-14 15:22:29 +0000 | [diff] [blame] | 173 | # Rules for makefile |
| 174 | |
Marcus Meissner | ca004e5 | 1999-01-03 12:26:22 +0000 | [diff] [blame] | 175 | Makefile: Makefile.in $(TOPSRCDIR)/configure |
| 176 | @echo Makefile is older than $?, please rerun $(TOPSRCDIR)/configure |
| 177 | @exit 1 |
| 178 | |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 179 | # Rule for linting |
| 180 | |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 181 | $(MODULE).ln : $(LINTS) |
| 182 | if test "$(LINTS)" ; \ |
| 183 | then \ |
| 184 | $(LINT) $(ALLLINTFLAGS) -o$(MODULE) $(LINTS) ; \ |
| 185 | $(MV) llib-l$(MODULE).ln $(MODULE).ln ; \ |
| 186 | else \ |
| 187 | $(LINT) $(ALLLINTFLAGS) -C$(MODULE) /dev/null ; \ |
| 188 | fi |
| 189 | |
| 190 | lint:: $(MODULE).ln |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 191 | |
Patrik Stridvall | 385dc18 | 1999-09-29 10:24:19 +0000 | [diff] [blame] | 192 | # Rules for Windows API checking |
| 193 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 194 | winapi_check:: dummy |
Patrik Stridvall | 385dc18 | 1999-09-29 10:24:19 +0000 | [diff] [blame] | 195 | $(WINAPI_CHECK) $(WINAPI_CHECK_FLAGS) $(WINAPI_CHECK_EXTRA_FLAGS) . |
| 196 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 197 | .PHONY: winapi_check |
| 198 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 199 | # Rules for dependencies |
| 200 | |
Alexandre Julliard | 3a3307d | 2004-10-07 03:12:44 +0000 | [diff] [blame] | 201 | $(SUBDIRS:%=%/__depend__): dummy |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 202 | cd `dirname $@` && $(MAKE) depend |
| 203 | |
Alexandre Julliard | 3a3307d | 2004-10-07 03:12:44 +0000 | [diff] [blame] | 204 | depend: $(IDL_SRCS:.idl=.h) $(SUBDIRS:%=%/__depend__) |
Alexandre Julliard | fc09423 | 2003-04-14 21:46:41 +0000 | [diff] [blame] | 205 | $(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] | 206 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 207 | .PHONY: depend $(SUBDIRS:%=%/__depend__) |
| 208 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 209 | # Rules for cleaning |
| 210 | |
| 211 | $(SUBDIRS:%=%/__clean__): dummy |
| 212 | cd `dirname $@` && $(MAKE) clean |
| 213 | |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 214 | $(SUBDIRS:%=%/__testclean__): dummy |
| 215 | cd `dirname $@` && $(MAKE) testclean |
| 216 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 217 | $(EXTRASUBDIRS:%=%/__clean__): dummy |
| 218 | -cd `dirname $@` && $(RM) $(CLEAN_FILES) |
| 219 | |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 220 | testclean:: $(SUBDIRS:%=%/__testclean__) |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 221 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 222 | clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__) |
Alexandre Julliard | 664e410 | 2005-10-06 16:06:04 +0000 | [diff] [blame] | 223 | $(RM) $(CLEAN_FILES) $(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res) $(MC_SRCS:.mc=.mc.rc) $(IDL_SRCS:.idl=.h) $(PROGRAMS) $(RC_BINARIES) $(RC_TLB) $(MANPAGES) |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 224 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 225 | .PHONY: clean testclean $(SUBDIRS:%=%/__clean__) $(SUBDIRS:%=%/__testclean__) $(EXTRASUBDIRS:%=%/__clean__) |
| 226 | |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 227 | # Rules for installing |
| 228 | |
Alexandre Julliard | 2d1c790 | 2003-03-22 20:40:48 +0000 | [diff] [blame] | 229 | $(SUBDIRS:%=%/__install__): dummy |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 230 | cd `dirname $@` && $(MAKE) install |
| 231 | |
Alexandre Julliard | 2d1c790 | 2003-03-22 20:40:48 +0000 | [diff] [blame] | 232 | $(SUBDIRS:%=%/__install-lib__): dummy |
| 233 | cd `dirname $@` && $(MAKE) install-lib |
| 234 | |
| 235 | $(SUBDIRS:%=%/__install-dev__): dummy |
| 236 | cd `dirname $@` && $(MAKE) install-dev |
| 237 | |
| 238 | $(SUBDIRS:%=%/__uninstall__): dummy |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 239 | cd `dirname $@` && $(MAKE) uninstall |
| 240 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 241 | install:: $(INSTALLSUBDIRS:%=%/__install__) |
| 242 | |
| 243 | uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__) |
| 244 | |
Alexandre Julliard | ada5e65 | 2002-12-12 22:03:14 +0000 | [diff] [blame] | 245 | .PHONY: install install-lib install-dev uninstall \ |
Alexandre Julliard | 2d1c790 | 2003-03-22 20:40:48 +0000 | [diff] [blame] | 246 | $(SUBDIRS:%=%/__install__) $(SUBDIRS:%=%/__uninstall__) \ |
| 247 | $(SUBDIRS:%=%/__install-lib__) $(SUBDIRS:%=%/__install-dev__) |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 248 | |
Alexandre Julliard | edeee89 | 2002-08-09 01:22:40 +0000 | [diff] [blame] | 249 | # Rules for checking that no imports are missing |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 250 | |
Alexandre Julliard | edeee89 | 2002-08-09 01:22:40 +0000 | [diff] [blame] | 251 | $(SUBDIRS:%=%/__checklink__): dummy |
| 252 | @cd `dirname $@` && $(MAKE) checklink |
| 253 | |
| 254 | .PHONY: checklink $(SUBDIRS:%=%/__checklink__) |
| 255 | |
| 256 | # Rules for testing |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 257 | |
Alexandre Julliard | d7c606d | 2002-04-02 02:58:45 +0000 | [diff] [blame] | 258 | $(SUBDIRS:%=%/__test__): dummy |
| 259 | @cd `dirname $@` && $(MAKE) test |
| 260 | |
Alexandre Julliard | c3c587e | 2002-09-06 19:46:00 +0000 | [diff] [blame] | 261 | $(SUBDIRS:%=%/__crosstest__): dummy |
| 262 | @cd `dirname $@` && $(MAKE) crosstest |
| 263 | |
| 264 | .PHONY: check test crosstest $(SUBDIRS:%=%/__test__) $(SUBDIRS:%=%/__crosstest__) |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 265 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 266 | # Misc. rules |
| 267 | |
Alexandre Julliard | 017a61e | 2000-11-06 05:30:48 +0000 | [diff] [blame] | 268 | $(MC_SRCS:.mc=.mc.rc): $(WMC) |
Alexandre Julliard | f5aee67 | 2000-07-25 17:52:08 +0000 | [diff] [blame] | 269 | |
Alexandre Julliard | 233766a | 2004-09-20 21:48:42 +0000 | [diff] [blame] | 270 | $(IDL_SRCS:.idl=.h): $(WIDL) |
| 271 | |
Vincent BĂ©ron | 860c84b | 2005-02-08 12:13:10 +0000 | [diff] [blame] | 272 | $(RC_TLB:.idl=.tlb): $(WIDL) |
| 273 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 274 | $(SUBDIRS): dummy |
| 275 | @cd $@ && $(MAKE) |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 276 | |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 277 | dummy: |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 278 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 279 | .PHONY: dummy $(SUBDIRS) |
| 280 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 281 | # End of global rules |