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