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 | 4091627 | 2007-03-08 13:19:50 +0100 | [diff] [blame] | 30 | FLEX = @FLEX@ |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 31 | EXEEXT = @EXEEXT@ |
| 32 | OBJEXT = @OBJEXT@ |
Alexandre Julliard | 2fa4f76 | 2000-10-31 00:20:51 +0000 | [diff] [blame] | 33 | LIBEXT = @LIBEXT@ |
Alexandre Julliard | c1bfca0 | 2002-03-20 22:19:06 +0000 | [diff] [blame] | 34 | DLLEXT = @DLLEXT@ |
Alexandre Julliard | ada5e65 | 2002-12-12 22:03:14 +0000 | [diff] [blame] | 35 | IMPLIBEXT = @IMPLIBEXT@ |
Alexandre Julliard | 2fa4f76 | 2000-10-31 00:20:51 +0000 | [diff] [blame] | 36 | LDSHARED = @LDSHARED@ |
Alexandre Julliard | ada5e65 | 2002-12-12 22:03:14 +0000 | [diff] [blame] | 37 | DLLTOOL = @DLLTOOL@ |
Hidenori Takeshima | d48ca94 | 2000-12-22 22:28:00 +0000 | [diff] [blame] | 38 | DLLWRAP = @DLLWRAP@ |
Rob Shearman | 0c694d7 | 2008-03-04 15:53:41 +0000 | [diff] [blame] | 39 | AR = @AR@ |
| 40 | ARFLAGS = @ARFLAGS@ |
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@ |
Francois Gouget | 86bd046 | 2008-06-26 14:05:57 +0200 | [diff] [blame] | 49 | NM = @NM@ |
Marcus Meissner | a387aa4 | 2000-09-26 23:09:47 +0000 | [diff] [blame] | 50 | LDFLAGS = @LDFLAGS@ |
Alexandre Julliard | adbb098 | 2005-08-09 11:12:29 +0000 | [diff] [blame] | 51 | PRELINK = @PRELINK@ |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 52 | RM = rm -f |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 53 | MV = mv |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 54 | LINT = @LINT@ |
| 55 | LINTFLAGS = @LINTFLAGS@ |
Huw Davies | 00acb5f | 2004-08-17 22:33:14 +0000 | [diff] [blame] | 56 | FONTFORGE = @FONTFORGE@ |
Alexandre Julliard | dc4a475 | 2008-03-20 16:09:18 +0100 | [diff] [blame] | 57 | RSVG = @RSVG@ |
| 58 | ICOTOOL = @ICOTOOL@ |
Alexandre Julliard | fc09423 | 2003-04-14 21:46:41 +0000 | [diff] [blame] | 59 | INCLUDES = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL) |
| 60 | EXTRACFLAGS = @EXTRACFLAGS@ |
Mike McCormack | b744372 | 2005-08-11 17:12:18 +0000 | [diff] [blame] | 61 | ALLCFLAGS = $(INCLUDES) $(DEFS) $(DLLFLAGS) $(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) $(MODCFLAGS) |
Alexandre Julliard | fc09423 | 2003-04-14 21:46:41 +0000 | [diff] [blame] | 62 | ALLLINTFLAGS = $(INCLUDES) $(DEFS) $(LINTFLAGS) |
Alexandre Julliard | 16cd861 | 2003-09-24 19:01:44 +0000 | [diff] [blame] | 63 | IDLFLAGS = $(INCLUDES) $(DEFS) $(EXTRAIDLFLAGS) |
Alexandre Julliard | 5cb97d8 | 2005-09-21 14:23:54 +0000 | [diff] [blame] | 64 | WINEBUILDFLAGS = $(DLLFLAGS) --as-cmd "$(AS)" |
Alexandre Julliard | fc09423 | 2003-04-14 21:46:41 +0000 | [diff] [blame] | 65 | MKINSTALLDIRS= $(TOPSRCDIR)/tools/mkinstalldirs -m 755 |
Hans Leidekker | a764450 | 2005-05-04 09:55:17 +0000 | [diff] [blame] | 66 | WINAPI_CHECK = $(TOPSRCDIR)/tools/winapi/winapi_check |
Alexandre Julliard | 3536316 | 2002-05-22 21:32:49 +0000 | [diff] [blame] | 67 | WINEWRAPPER = $(TOPSRCDIR)/tools/winewrapper |
Richard Cohen | 6039fb0 | 2003-07-21 22:01:07 +0000 | [diff] [blame] | 68 | C2MAN = $(TOPSRCDIR)/tools/c2man.pl |
Dimitrie O. Paun | e39e8a1 | 2002-11-11 20:25:54 +0000 | [diff] [blame] | 69 | RUNTEST = $(TOPSRCDIR)/tools/runtest |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 70 | WINEBUILD = $(TOOLSDIR)/tools/winebuild/winebuild |
| 71 | MAKEDEP = $(TOOLSDIR)/tools/makedep |
Alexandre Julliard | bcb7591 | 2005-03-16 20:02:17 +0000 | [diff] [blame] | 72 | MAKECTESTS = $(TOOLSDIR)/tools/make_ctests |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 73 | WRC = $(TOOLSDIR)/tools/wrc/wrc |
| 74 | WMC = $(TOOLSDIR)/tools/wmc/wmc |
Alexandre Julliard | ed2f8fc | 2002-12-03 23:36:05 +0000 | [diff] [blame] | 75 | WIDL = $(TOOLSDIR)/tools/widl/widl |
Alexandre Julliard | ccc3d66 | 2004-03-02 06:58:21 +0000 | [diff] [blame] | 76 | WINEGCC = $(TOOLSDIR)/tools/winegcc/winegcc |
Alexandre Julliard | 35842ca | 2006-02-17 11:42:17 +0100 | [diff] [blame] | 77 | RELPATH = $(TOOLSDIR)/tools/relpath |
Huw Davies | 00acb5f | 2004-08-17 22:33:14 +0000 | [diff] [blame] | 78 | SFNT2FNT = $(TOOLSDIR)/tools/sfnt2fnt |
| 79 | FNT2FON = $(TOOLSDIR)/tools/fnt2fon |
Dimitrie O. Paun | 1a1f9bf | 2003-05-06 18:34:53 +0000 | [diff] [blame] | 80 | RC = $(WRC) |
| 81 | RC16 = $(WRC) |
Alexandre Julliard | 49b9c76 | 2003-12-13 03:19:34 +0000 | [diff] [blame] | 82 | RCFLAGS = --nostdinc $(INCLUDES) $(DEFS) $(EXTRARCFLAGS) |
Dimitrie O. Paun | 1a1f9bf | 2003-05-06 18:34:53 +0000 | [diff] [blame] | 83 | RC16FLAGS = -O res16 $(RCFLAGS) |
Alexandre Julliard | 2a93f85 | 2002-12-11 01:34:51 +0000 | [diff] [blame] | 84 | LDPATH = @LDPATH@ |
| 85 | DLLDIR = $(TOPOBJDIR)/dlls |
Alexandre Julliard | 645cd6f | 2006-07-11 19:33:48 +0200 | [diff] [blame] | 86 | LIBPORT = $(TOPOBJDIR)/libs/port/libwine_port.a |
| 87 | LIBWPP = $(TOPOBJDIR)/libs/wpp/libwpp.a |
Alexandre Julliard | 2d1c790 | 2003-03-22 20:40:48 +0000 | [diff] [blame] | 88 | LIBWINE = -L$(TOPOBJDIR)/libs/wine -lwine |
Alexandre Julliard | 1f11333 | 2007-06-20 20:03:30 +0200 | [diff] [blame] | 89 | LDRPATH_INSTALL = @LDRPATH_INSTALL@ |
| 90 | LDRPATH_LOCAL = @LDRPATH_LOCAL@ |
Alexandre Julliard | b018239 | 2000-12-06 00:04:10 +0000 | [diff] [blame] | 91 | |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 92 | @SET_MAKE@ |
| 93 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 94 | # Installation infos |
| 95 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 96 | INSTALL = @INSTALL@ $(INSTALL_FLAGS) |
| 97 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(INSTALL_PROGRAM_FLAGS) |
| 98 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ $(INSTALL_SCRIPT_FLAGS) |
| 99 | INSTALL_DATA = @INSTALL_DATA@ $(INSTALL_DATA_FLAGS) |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 100 | prefix = @prefix@ |
| 101 | exec_prefix = @exec_prefix@ |
| 102 | bindir = @bindir@ |
| 103 | libdir = @libdir@ |
Alexandre Julliard | 7498411 | 2006-05-28 18:16:38 +0200 | [diff] [blame] | 104 | datarootdir = @datarootdir@ |
Alexandre Julliard | 1d8d017 | 2002-08-02 19:34:21 +0000 | [diff] [blame] | 105 | datadir = @datadir@ |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 106 | infodir = @infodir@ |
Alexandre Julliard | d6baf1b | 1999-07-18 15:47:22 +0000 | [diff] [blame] | 107 | mandir = @mandir@ |
Alexandre Julliard | 9bb05fc | 2002-05-14 18:36:54 +0000 | [diff] [blame] | 108 | sysconfdir = @sysconfdir@ |
| 109 | includedir = @includedir@/wine |
Alexandre Julliard | c1bfca0 | 2002-03-20 22:19:06 +0000 | [diff] [blame] | 110 | dlldir = @libdir@/wine |
Alexandre Julliard | d6baf1b | 1999-07-18 15:47:22 +0000 | [diff] [blame] | 111 | prog_manext = 1 |
Jon Griffiths | 35345f2 | 2003-03-15 19:48:34 +0000 | [diff] [blame] | 112 | api_manext = 3w |
Alexandre Julliard | d6baf1b | 1999-07-18 15:47:22 +0000 | [diff] [blame] | 113 | conf_manext = 5 |
Alexandre Julliard | 1137f4b | 2008-03-13 11:47:23 +0100 | [diff] [blame] | 114 | CLEAN_FILES = *.o *.a *.so *.ln *.res *.$(LIBEXT) \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej *.flc core |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 115 | |
Alexandre Julliard | 1df72cc | 2007-02-09 14:32:36 +0100 | [diff] [blame] | 116 | IDL_GEN_C_SRCS = $(IDL_C_SRCS:.idl=_c.c) $(IDL_I_SRCS:.idl=_i.c) \ |
| 117 | $(IDL_P_SRCS:.idl=_p.c) $(IDL_S_SRCS:.idl=_s.c) |
| 118 | IDL_GEN_HEADERS = $(IDL_H_SRCS:.idl=.h) $(IDL_C_SRCS:.idl=.h) $(IDL_I_SRCS:.idl=.h) \ |
| 119 | $(IDL_P_SRCS:.idl=.h) $(IDL_S_SRCS:.idl=.h) |
Alexandre Julliard | ce25156 | 2006-12-29 12:42:25 +0100 | [diff] [blame] | 120 | |
Alexandre Julliard | b0585bf | 2007-12-10 14:26:13 +0100 | [diff] [blame] | 121 | CLEAN_TARGETS = $(IDL_GEN_C_SRCS) $(IDL_GEN_HEADERS) $(IDL_TLB_SRCS:.idl=.tlb) $(IDL_P_SRCS:%=dlldata.c) \ |
Alexandre Julliard | 1137f4b | 2008-03-13 11:47:23 +0100 | [diff] [blame] | 122 | $(BISON_SRCS:.y=.tab.c) $(BISON_SRCS:.y=.tab.h) $(LEX_SRCS:.l=.yy.c) $(MC_SRCS:.mc=.mc.rc) |
Alexandre Julliard | ce25156 | 2006-12-29 12:42:25 +0100 | [diff] [blame] | 123 | |
Alexandre Julliard | 12c1962 | 2006-10-16 17:20:37 +0200 | [diff] [blame] | 124 | OBJS = $(C_SRCS:.c=.o) $(BISON_SRCS:.y=.tab.o) $(LEX_SRCS:.l=.yy.o) $(IDL_GEN_C_SRCS:.c=.o) $(EXTRA_OBJS) |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 125 | |
Steven Edwards | 9138fbb | 2002-07-29 23:28:09 +0000 | [diff] [blame] | 126 | RCOBJS = $(RC_SRCS:.rc=.res.o) |
| 127 | LINTS = $(C_SRCS:.c=.ln) |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 128 | |
Alexandre Julliard | d8e3d18 | 2008-04-24 12:46:43 +0200 | [diff] [blame] | 129 | # 'all' target first in case the enclosing Makefile didn't define any target |
| 130 | |
| 131 | all: |
| 132 | |
| 133 | filter: dummy |
| 134 | @$(TOPSRCDIR)/tools/winapi/make_filter --make $(MAKE) all |
| 135 | |
| 136 | .PHONY: all filter |
| 137 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 138 | # Implicit rules |
| 139 | |
Alexandre Julliard | 8ad6049 | 2008-03-22 21:23:56 +0100 | [diff] [blame] | 140 | .SUFFIXES: .mc .rc .mc.rc .res .res.o .spec .spec.o .idl .tlb .h .y .l .tab.c .tab.h .yy.c .ok .man.in .man _c.c _i.c _p.c _s.c @MAINTAINER_MODE@ .sfd .ttf .svg .ico |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 141 | |
| 142 | .c.o: |
François Gouget | 1c3a242 | 2001-11-09 19:15:51 +0000 | [diff] [blame] | 143 | $(CC) -c $(ALLCFLAGS) -o $@ $< |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 144 | |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 145 | .s.o: |
François Gouget | 1c3a242 | 2001-11-09 19:15:51 +0000 | [diff] [blame] | 146 | $(AS) -o $@ $< |
Alexandre Julliard | 7e6ae4b | 1996-12-08 19:25:27 +0000 | [diff] [blame] | 147 | |
Alexandre Julliard | 9c085cb | 2006-09-09 13:16:22 +0200 | [diff] [blame] | 148 | .y.tab.c: |
Alexandre Julliard | bcdc5fb | 2006-09-11 21:47:49 +0200 | [diff] [blame] | 149 | $(BISON) $(BISONFLAGS) -p $*_ -o $@ $< |
Alexandre Julliard | 9c085cb | 2006-09-09 13:16:22 +0200 | [diff] [blame] | 150 | |
| 151 | .y.tab.h: |
Alexandre Julliard | bcdc5fb | 2006-09-11 21:47:49 +0200 | [diff] [blame] | 152 | $(BISON) $(BISONFLAGS) -p $*_ -o $*.tab.c -d $< |
Alexandre Julliard | 9c085cb | 2006-09-09 13:16:22 +0200 | [diff] [blame] | 153 | |
| 154 | .l.yy.c: |
Alexandre Julliard | 4091627 | 2007-03-08 13:19:50 +0100 | [diff] [blame] | 155 | $(FLEX) $(LEXFLAGS) -o$@ $< |
Alexandre Julliard | 9c085cb | 2006-09-09 13:16:22 +0200 | [diff] [blame] | 156 | |
Alexandre Julliard | 017a61e | 2000-11-06 05:30:48 +0000 | [diff] [blame] | 157 | .mc.mc.rc: |
Martin Fuchs | 3f44167 | 2002-10-19 17:15:00 +0000 | [diff] [blame] | 158 | $(LDPATH) $(WMC) -i -U -H /dev/null -o $@ $< |
Alexandre Julliard | f5aee67 | 2000-07-25 17:52:08 +0000 | [diff] [blame] | 159 | |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +0000 | [diff] [blame] | 160 | .rc.res: |
Dimitrie O. Paun | 1a1f9bf | 2003-05-06 18:34:53 +0000 | [diff] [blame] | 161 | $(LDPATH) $(RC) $(RCFLAGS) -fo$@ $< |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +0000 | [diff] [blame] | 162 | |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 163 | .res.res.o: |
| 164 | $(WINDRES) -i $< -o $@ |
| 165 | |
Alexandre Julliard | 5cb97d8 | 2005-09-21 14:23:54 +0000 | [diff] [blame] | 166 | .spec.spec.o: |
| 167 | $(WINEBUILD) $(WINEBUILDFLAGS) --dll -o $@ --main-module $(MODULE) --export $< |
Ulrich Weigand | 3dff7bb | 1999-07-11 13:58:31 +0000 | [diff] [blame] | 168 | |
Alexandre Julliard | 233766a | 2004-09-20 21:48:42 +0000 | [diff] [blame] | 169 | .idl.h: |
Alexandre Julliard | d062924 | 2004-10-05 04:44:20 +0000 | [diff] [blame] | 170 | $(WIDL) $(IDLFLAGS) -h -H $@ $< |
Alexandre Julliard | 233766a | 2004-09-20 21:48:42 +0000 | [diff] [blame] | 171 | |
Alexandre Julliard | 4e67a45 | 2006-08-09 12:38:15 +0200 | [diff] [blame] | 172 | .idl_c.c: |
| 173 | $(WIDL) $(IDLFLAGS) -c -C $@ $< |
| 174 | |
| 175 | .idl_i.c: |
| 176 | $(WIDL) $(IDLFLAGS) -u -U $@ $< |
| 177 | |
| 178 | .idl_p.c: |
| 179 | $(WIDL) $(IDLFLAGS) -p -P $@ $< |
| 180 | |
| 181 | .idl_s.c: |
| 182 | $(WIDL) $(IDLFLAGS) -s -S $@ $< |
| 183 | |
Huw Davies | 4046846 | 2005-01-28 14:13:08 +0000 | [diff] [blame] | 184 | .idl.tlb: |
| 185 | $(WIDL) $(IDLFLAGS) -t -T $@ $< |
| 186 | |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 187 | .c.ln: |
| 188 | $(LINT) -c $(ALLLINTFLAGS) $< || ( $(RM) $@ && exit 1 ) |
| 189 | |
Alexandre Julliard | caa0338 | 2002-02-20 19:03:59 +0000 | [diff] [blame] | 190 | .c.ok: |
Alexandre Julliard | edeee89 | 2002-08-09 01:22:40 +0000 | [diff] [blame] | 191 | $(RUNTEST) $(RUNTESTFLAGS) $< && touch $@ |
Alexandre Julliard | caa0338 | 2002-02-20 19:03:59 +0000 | [diff] [blame] | 192 | |
Huw Davies | 00acb5f | 2004-08-17 22:33:14 +0000 | [diff] [blame] | 193 | .sfd.ttf: |
Robert Shearman | 8b00c3d | 2005-07-20 17:48:26 +0000 | [diff] [blame] | 194 | $(FONTFORGE) -script $(TOPSRCDIR)/fonts/genttf.ff $< $@ |
Huw Davies | 00acb5f | 2004-08-17 22:33:14 +0000 | [diff] [blame] | 195 | |
Alexandre Julliard | 664e410 | 2005-10-06 16:06:04 +0000 | [diff] [blame] | 196 | .man.in.man: |
Alexandre Julliard | 1716f03 | 2007-12-12 14:39:54 +0100 | [diff] [blame] | 197 | LC_ALL=C sed -e 's,@bindir\@,$(bindir),g' -e 's,@dlldir\@,$(dlldir),g' -e 's,@PACKAGE_STRING\@,@PACKAGE_STRING@,g' $< >$@ || ($(RM) $@ && false) |
Alexandre Julliard | 664e410 | 2005-10-06 16:06:04 +0000 | [diff] [blame] | 198 | |
Alexandre Julliard | dc4a475 | 2008-03-20 16:09:18 +0100 | [diff] [blame] | 199 | .svg.ico: |
| 200 | $(RSVG) -w 16 -h 16 -f png $< $*-16.png |
| 201 | $(RSVG) -w 32 -h 32 -f png $< $*-32.png |
| 202 | $(RSVG) -w 48 -h 48 -f png $< $*-48.png |
| 203 | $(ICOTOOL) -c -o $@ $*-16.png $*-32.png $*-48.png |
| 204 | $(RM) $*-16.png $*-32.png $*-48.png |
| 205 | |
Alexandre Julliard | b0585bf | 2007-12-10 14:26:13 +0100 | [diff] [blame] | 206 | # Rules for IDL files |
| 207 | |
| 208 | dlldata.c: $(WIDL) Makefile.in |
| 209 | $(WIDL) $(IDLFLAGS) --dlldata-only --dlldata=$@ $(IDL_P_SRCS) |
| 210 | |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 211 | # Rule for linting |
| 212 | |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 213 | $(MODULE).ln : $(LINTS) |
| 214 | if test "$(LINTS)" ; \ |
| 215 | then \ |
| 216 | $(LINT) $(ALLLINTFLAGS) -o$(MODULE) $(LINTS) ; \ |
| 217 | $(MV) llib-l$(MODULE).ln $(MODULE).ln ; \ |
| 218 | else \ |
| 219 | $(LINT) $(ALLLINTFLAGS) -C$(MODULE) /dev/null ; \ |
| 220 | fi |
| 221 | |
| 222 | lint:: $(MODULE).ln |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 223 | |
Patrik Stridvall | 385dc18 | 1999-09-29 10:24:19 +0000 | [diff] [blame] | 224 | # Rules for Windows API checking |
| 225 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 226 | winapi_check:: dummy |
Patrik Stridvall | 385dc18 | 1999-09-29 10:24:19 +0000 | [diff] [blame] | 227 | $(WINAPI_CHECK) $(WINAPI_CHECK_FLAGS) $(WINAPI_CHECK_EXTRA_FLAGS) . |
| 228 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 229 | .PHONY: winapi_check |
| 230 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 231 | # Rules for dependencies |
| 232 | |
Alexandre Julliard | da19122 | 2008-04-24 22:13:57 +0200 | [diff] [blame] | 233 | DEPEND_SRCS = $(C_SRCS) $(C_SRCS16) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) \ |
| 234 | $(IDL_H_SRCS) $(IDL_C_SRCS) $(IDL_I_SRCS) $(IDL_P_SRCS) $(IDL_S_SRCS) \ |
| 235 | $(IDL_GEN_C_SRCS) $(IDL_TLB_SRCS) $(IDL_TLB_SRCS:.idl=.tlb) \ |
| 236 | $(BISON_SRCS) $(LEX_SRCS) $(EXTRA_SRCS) |
Alexandre Julliard | 9c085cb | 2006-09-09 13:16:22 +0200 | [diff] [blame] | 237 | |
Alexandre Julliard | 3a3307d | 2004-10-07 03:12:44 +0000 | [diff] [blame] | 238 | $(SUBDIRS:%=%/__depend__): dummy |
Alexandre Julliard | 5012c17 | 2006-08-07 13:54:09 +0200 | [diff] [blame] | 239 | @cd `dirname $@` && $(MAKE) depend |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 240 | |
Alexandre Julliard | e4fca88 | 2006-09-10 22:04:42 +0200 | [diff] [blame] | 241 | depend: $(SUBDIRS:%=%/__depend__) dummy |
Alexandre Julliard | 9c085cb | 2006-09-09 13:16:22 +0200 | [diff] [blame] | 242 | $(MAKEDEP) -C$(SRCDIR) -S$(TOPSRCDIR) -T$(TOPOBJDIR) $(EXTRAINCL) $(DEPEND_SRCS) |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 243 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 244 | .PHONY: depend $(SUBDIRS:%=%/__depend__) |
| 245 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 246 | # Rules for cleaning |
| 247 | |
| 248 | $(SUBDIRS:%=%/__clean__): dummy |
Alexandre Julliard | 5012c17 | 2006-08-07 13:54:09 +0200 | [diff] [blame] | 249 | @cd `dirname $@` && $(MAKE) clean |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 250 | |
| 251 | $(EXTRASUBDIRS:%=%/__clean__): dummy |
| 252 | -cd `dirname $@` && $(RM) $(CLEAN_FILES) |
| 253 | |
| 254 | clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__) |
Alexandre Julliard | b64ceef | 2007-09-18 13:29:07 +0200 | [diff] [blame] | 255 | $(RM) $(CLEAN_FILES) $(CLEAN_TARGETS) $(PROGRAMS) $(MANPAGES) |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 256 | |
Alexandre Julliard | 5cf75e6 | 2006-08-28 13:37:44 +0200 | [diff] [blame] | 257 | .PHONY: clean $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__) |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 258 | |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 259 | # Rules for installing |
| 260 | |
Alexandre Julliard | 2d1c790 | 2003-03-22 20:40:48 +0000 | [diff] [blame] | 261 | $(SUBDIRS:%=%/__install__): dummy |
Alexandre Julliard | 5012c17 | 2006-08-07 13:54:09 +0200 | [diff] [blame] | 262 | @cd `dirname $@` && $(MAKE) install |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 263 | |
Alexandre Julliard | 2d1c790 | 2003-03-22 20:40:48 +0000 | [diff] [blame] | 264 | $(SUBDIRS:%=%/__install-lib__): dummy |
Alexandre Julliard | 5012c17 | 2006-08-07 13:54:09 +0200 | [diff] [blame] | 265 | @cd `dirname $@` && $(MAKE) install-lib |
Alexandre Julliard | 2d1c790 | 2003-03-22 20:40:48 +0000 | [diff] [blame] | 266 | |
| 267 | $(SUBDIRS:%=%/__install-dev__): dummy |
Alexandre Julliard | 5012c17 | 2006-08-07 13:54:09 +0200 | [diff] [blame] | 268 | @cd `dirname $@` && $(MAKE) install-dev |
Alexandre Julliard | 2d1c790 | 2003-03-22 20:40:48 +0000 | [diff] [blame] | 269 | |
| 270 | $(SUBDIRS:%=%/__uninstall__): dummy |
Alexandre Julliard | 5012c17 | 2006-08-07 13:54:09 +0200 | [diff] [blame] | 271 | @cd `dirname $@` && $(MAKE) uninstall |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 272 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 273 | install:: $(INSTALLSUBDIRS:%=%/__install__) |
Alexandre Julliard | b3ec2e5 | 2008-08-25 14:27:03 +0200 | [diff] [blame] | 274 | install-lib:: $(INSTALLSUBDIRS:%=%/__install-lib__) |
| 275 | install-dev:: $(INSTALLSUBDIRS:%=%/__install-dev__) |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 276 | uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__) |
| 277 | |
Alexandre Julliard | 2886e9b | 2006-08-07 17:48:18 +0200 | [diff] [blame] | 278 | $(INSTALLDIRS): |
| 279 | $(MKINSTALLDIRS) $@ |
| 280 | |
Alexandre Julliard | ada5e65 | 2002-12-12 22:03:14 +0000 | [diff] [blame] | 281 | .PHONY: install install-lib install-dev uninstall \ |
Alexandre Julliard | 2d1c790 | 2003-03-22 20:40:48 +0000 | [diff] [blame] | 282 | $(SUBDIRS:%=%/__install__) $(SUBDIRS:%=%/__uninstall__) \ |
| 283 | $(SUBDIRS:%=%/__install-lib__) $(SUBDIRS:%=%/__install-dev__) |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 284 | |
Alexandre Julliard | edeee89 | 2002-08-09 01:22:40 +0000 | [diff] [blame] | 285 | # Rules for testing |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 286 | |
Alexandre Julliard | 5cf75e6 | 2006-08-28 13:37:44 +0200 | [diff] [blame] | 287 | $(TESTSUBDIRS:%=%/__test__): dummy |
Alexandre Julliard | d7c606d | 2002-04-02 02:58:45 +0000 | [diff] [blame] | 288 | @cd `dirname $@` && $(MAKE) test |
| 289 | |
Alexandre Julliard | 5cf75e6 | 2006-08-28 13:37:44 +0200 | [diff] [blame] | 290 | $(TESTSUBDIRS:%=%/__crosstest__): dummy |
Alexandre Julliard | c3c587e | 2002-09-06 19:46:00 +0000 | [diff] [blame] | 291 | @cd `dirname $@` && $(MAKE) crosstest |
| 292 | |
Alexandre Julliard | 5cf75e6 | 2006-08-28 13:37:44 +0200 | [diff] [blame] | 293 | $(TESTSUBDIRS:%=%/__testclean__): dummy |
| 294 | @cd `dirname $@` && $(MAKE) testclean |
| 295 | |
| 296 | check test:: $(TESTSUBDIRS:%=%/__test__) |
| 297 | |
| 298 | crosstest:: $(TESTSUBDIRS:%=%/__crosstest__) |
| 299 | |
| 300 | testclean:: $(TESTSUBDIRS:%=%/__testclean__) |
| 301 | |
| 302 | .PHONY: check test testclean crosstest $(TESTSUBDIRS:%=%/__test__) $(TESTSUBDIRS:%=%/__crosstest__) $(TESTSUBDIRS:%=%/__testclean__) |
| 303 | |
| 304 | # Rules for auto documentation |
| 305 | |
| 306 | $(DOCSUBDIRS:%=%/__man__): dummy |
| 307 | @cd `dirname $@` && $(MAKE) man |
| 308 | |
| 309 | $(DOCSUBDIRS:%=%/__doc_html__): dummy |
| 310 | @cd `dirname $@` && $(MAKE) doc-html |
| 311 | |
| 312 | $(DOCSUBDIRS:%=%/__doc_sgml__): dummy |
| 313 | @cd `dirname $@` && $(MAKE) doc-sgml |
| 314 | |
| 315 | man: $(DOCSUBDIRS:%=%/__man__) |
| 316 | doc-html: $(DOCSUBDIRS:%=%/__doc_html__) |
| 317 | doc-sgml: $(DOCSUBDIRS:%=%/__doc_sgml__) |
| 318 | |
| 319 | .PHONY: man doc-html doc-sgml $(DOCSUBDIRS:%=%/__man__) $(DOCSUBDIRS:%=%/__doc_html__) $(DOCSUBDIRS:%=%/__doc_sgml__) |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 320 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 321 | # Misc. rules |
| 322 | |
Alexandre Julliard | 017a61e | 2000-11-06 05:30:48 +0000 | [diff] [blame] | 323 | $(MC_SRCS:.mc=.mc.rc): $(WMC) |
Alexandre Julliard | f5aee67 | 2000-07-25 17:52:08 +0000 | [diff] [blame] | 324 | |
Alexandre Julliard | 1df72cc | 2007-02-09 14:32:36 +0100 | [diff] [blame] | 325 | $(IDL_GEN_HEADERS) $(IDL_GEN_C_SRCS) $(IDL_TLB_SRCS:.idl=.tlb): $(WIDL) |
Vincent BĂ©ron | 860c84b | 2005-02-08 12:13:10 +0000 | [diff] [blame] | 326 | |
Alexandre Julliard | da19122 | 2008-04-24 22:13:57 +0200 | [diff] [blame] | 327 | $(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res): $(WRC) |
| 328 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 329 | $(SUBDIRS): dummy |
| 330 | @cd $@ && $(MAKE) |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 331 | |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 332 | dummy: |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 333 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 334 | .PHONY: dummy $(SUBDIRS) |
| 335 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 336 | # End of global rules |