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 | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 11 | # RC_SRCS : resource source files |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 12 | # EXTRA_SRCS : extra source files for make depend |
| 13 | # EXTRA_OBJS : extra object files |
Alexandre Julliard | 3245991 | 2002-05-09 00:05:48 +0000 | [diff] [blame] | 14 | # IMPORTS : dlls to import |
| 15 | # DELAYIMPORTS : dlls to import in delayed mode |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 16 | # EXTRASUBDIRS : subdirectories that do not contain a Makefile |
Mike McCormack | b744372 | 2005-08-11 17:12:18 +0000 | [diff] [blame] | 17 | # MODCFLAGS : extra CFLAGS for this module |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 18 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 19 | # First some useful definitions |
| 20 | |
Alexandre Julliard | 8664b89 | 1996-04-05 14:58:24 +0000 | [diff] [blame] | 21 | SHELL = /bin/sh |
| 22 | CC = @CC@ |
Alexandre Julliard | fc09423 | 2003-04-14 21:46:41 +0000 | [diff] [blame] | 23 | CFLAGS = @CFLAGS@ |
Alexandre Julliard | 1556639 | 2003-06-13 23:26:01 +0000 | [diff] [blame] | 24 | CPPFLAGS = @CPPFLAGS@ |
Alexandre Julliard | 02e9008 | 1998-01-04 17:49:09 +0000 | [diff] [blame] | 25 | LIBS = @LIBS@ |
Mike McCormack | c068f67 | 2004-03-16 03:11:39 +0000 | [diff] [blame] | 26 | BISON = @BISON@ |
Alexandre Julliard | 4091627 | 2007-03-08 13:19:50 +0100 | [diff] [blame] | 27 | FLEX = @FLEX@ |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 28 | EXEEXT = @EXEEXT@ |
| 29 | OBJEXT = @OBJEXT@ |
Alexandre Julliard | 2fa4f76 | 2000-10-31 00:20:51 +0000 | [diff] [blame] | 30 | LIBEXT = @LIBEXT@ |
Alexandre Julliard | c1bfca0 | 2002-03-20 22:19:06 +0000 | [diff] [blame] | 31 | DLLEXT = @DLLEXT@ |
Alexandre Julliard | b860c4a | 2009-09-01 22:36:13 +0200 | [diff] [blame] | 32 | TOOLSEXT = @TOOLSEXT@ |
Alexandre Julliard | ada5e65 | 2002-12-12 22:03:14 +0000 | [diff] [blame] | 33 | IMPLIBEXT = @IMPLIBEXT@ |
Alexandre Julliard | 2fa4f76 | 2000-10-31 00:20:51 +0000 | [diff] [blame] | 34 | LDSHARED = @LDSHARED@ |
Alexandre Julliard | ada5e65 | 2002-12-12 22:03:14 +0000 | [diff] [blame] | 35 | DLLTOOL = @DLLTOOL@ |
Hidenori Takeshima | d48ca94 | 2000-12-22 22:28:00 +0000 | [diff] [blame] | 36 | DLLWRAP = @DLLWRAP@ |
Rob Shearman | 0c694d7 | 2008-03-04 15:53:41 +0000 | [diff] [blame] | 37 | AR = @AR@ |
| 38 | ARFLAGS = @ARFLAGS@ |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 39 | RANLIB = @RANLIB@ |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 40 | STRIP = @STRIP@ |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 41 | LN_S = @LN_S@ |
Alexandre Julliard | fc01b72 | 2002-05-12 03:16:39 +0000 | [diff] [blame] | 42 | TOOLSDIR = @TOOLSDIR@ |
Marcus Meissner | a387aa4 | 2000-09-26 23:09:47 +0000 | [diff] [blame] | 43 | LDFLAGS = @LDFLAGS@ |
Alexandre Julliard | adbb098 | 2005-08-09 11:12:29 +0000 | [diff] [blame] | 44 | PRELINK = @PRELINK@ |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 45 | RM = rm -f |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 46 | MV = mv |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 47 | LINT = @LINT@ |
| 48 | LINTFLAGS = @LINTFLAGS@ |
Huw Davies | 00acb5f | 2004-08-17 22:33:14 +0000 | [diff] [blame] | 49 | FONTFORGE = @FONTFORGE@ |
Alexandre Julliard | dc4a475 | 2008-03-20 16:09:18 +0100 | [diff] [blame] | 50 | RSVG = @RSVG@ |
Joel Holdsworth | 476a2be | 2010-04-05 11:15:03 +0100 | [diff] [blame] | 51 | CONVERT = @CONVERT@ |
Alexandre Julliard | dc4a475 | 2008-03-20 16:09:18 +0100 | [diff] [blame] | 52 | ICOTOOL = @ICOTOOL@ |
Alexandre Julliard | cce4387 | 2010-01-23 18:00:54 +0100 | [diff] [blame] | 53 | CROSSCC = @CROSSCC@ |
Alexandre Julliard | 1f25421 | 2010-01-23 20:26:49 +0100 | [diff] [blame] | 54 | CROSSTARGET = @CROSSTARGET@ |
| 55 | CROSSAR = $(CROSSTARGET)-ar |
| 56 | CROSSRANLIB = $(CROSSTARGET)-ranlib |
Alexandre Julliard | f78a8ce | 2009-08-18 11:29:35 +0200 | [diff] [blame] | 57 | FAKEEXT = $(DLLEXT:.so=.fake) |
Alexandre Julliard | fc09423 | 2003-04-14 21:46:41 +0000 | [diff] [blame] | 58 | INCLUDES = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL) |
| 59 | EXTRACFLAGS = @EXTRACFLAGS@ |
Mike McCormack | b744372 | 2005-08-11 17:12:18 +0000 | [diff] [blame] | 60 | ALLCFLAGS = $(INCLUDES) $(DEFS) $(DLLFLAGS) $(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) $(MODCFLAGS) |
Alexandre Julliard | fc09423 | 2003-04-14 21:46:41 +0000 | [diff] [blame] | 61 | ALLLINTFLAGS = $(INCLUDES) $(DEFS) $(LINTFLAGS) |
Alexandre Julliard | 16cd861 | 2003-09-24 19:01:44 +0000 | [diff] [blame] | 62 | IDLFLAGS = $(INCLUDES) $(DEFS) $(EXTRAIDLFLAGS) |
Alexandre Julliard | 8c84636 | 2009-01-14 12:53:42 +0100 | [diff] [blame] | 63 | TARGETFLAGS = @TARGETFLAGS@ |
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 |
Joel Holdsworth | 465e653 | 2010-05-16 23:07:57 +0100 | [diff] [blame] | 66 | BUILDIMAGE = $(TOPSRCDIR)/tools/buildimage |
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 | 6c14238 | 2010-04-11 12:47:30 +0200 | [diff] [blame] | 75 | WINEGCC = $(TOOLSDIR)/tools/winegcc/winegcc $(TARGETFLAGS) -B$(TOOLSDIR)/tools/winebuild --sysroot=$(TOPOBJDIR) @UNWINDFLAGS@ |
Alexandre Julliard | 4945a13 | 2010-01-23 20:33:37 +0100 | [diff] [blame] | 76 | CROSSWINEGCC = $(TOOLSDIR)/tools/winegcc/winegcc $(CROSSTARGET:%=-b %) -B$(TOOLSDIR)/tools/winebuild --sysroot=$(TOPOBJDIR) --lib-suffix=.cross.a |
Alexandre Julliard | b860c4a | 2009-09-01 22:36:13 +0200 | [diff] [blame] | 77 | RELPATH = $(TOOLSDIR)/tools/relpath$(TOOLSEXT) |
| 78 | SFNT2FNT = $(TOOLSDIR)/tools/sfnt2fnt$(TOOLSEXT) |
Dimitrie O. Paun | 1a1f9bf | 2003-05-06 18:34:53 +0000 | [diff] [blame] | 79 | RC = $(WRC) |
Alexandre Julliard | 49b9c76 | 2003-12-13 03:19:34 +0000 | [diff] [blame] | 80 | RCFLAGS = --nostdinc $(INCLUDES) $(DEFS) $(EXTRARCFLAGS) |
Alexandre Julliard | 2a93f85 | 2002-12-11 01:34:51 +0000 | [diff] [blame] | 81 | LDPATH = @LDPATH@ |
| 82 | DLLDIR = $(TOPOBJDIR)/dlls |
Alexandre Julliard | 645cd6f | 2006-07-11 19:33:48 +0200 | [diff] [blame] | 83 | LIBPORT = $(TOPOBJDIR)/libs/port/libwine_port.a |
| 84 | LIBWPP = $(TOPOBJDIR)/libs/wpp/libwpp.a |
Alexandre Julliard | 2d1c790 | 2003-03-22 20:40:48 +0000 | [diff] [blame] | 85 | LIBWINE = -L$(TOPOBJDIR)/libs/wine -lwine |
Alexandre Julliard | 1f11333 | 2007-06-20 20:03:30 +0200 | [diff] [blame] | 86 | LDRPATH_INSTALL = @LDRPATH_INSTALL@ |
| 87 | LDRPATH_LOCAL = @LDRPATH_LOCAL@ |
Alexandre Julliard | b018239 | 2000-12-06 00:04:10 +0000 | [diff] [blame] | 88 | |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 89 | @SET_MAKE@ |
| 90 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 91 | # Installation infos |
| 92 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 93 | INSTALL = @INSTALL@ $(INSTALL_FLAGS) |
| 94 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(INSTALL_PROGRAM_FLAGS) |
| 95 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ $(INSTALL_SCRIPT_FLAGS) |
| 96 | INSTALL_DATA = @INSTALL_DATA@ $(INSTALL_DATA_FLAGS) |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 97 | prefix = @prefix@ |
| 98 | exec_prefix = @exec_prefix@ |
| 99 | bindir = @bindir@ |
| 100 | libdir = @libdir@ |
Alexandre Julliard | 7498411 | 2006-05-28 18:16:38 +0200 | [diff] [blame] | 101 | datarootdir = @datarootdir@ |
Alexandre Julliard | 1d8d017 | 2002-08-02 19:34:21 +0000 | [diff] [blame] | 102 | datadir = @datadir@ |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 103 | infodir = @infodir@ |
Alexandre Julliard | d6baf1b | 1999-07-18 15:47:22 +0000 | [diff] [blame] | 104 | mandir = @mandir@ |
Alexandre Julliard | 9bb05fc | 2002-05-14 18:36:54 +0000 | [diff] [blame] | 105 | sysconfdir = @sysconfdir@ |
| 106 | includedir = @includedir@/wine |
Alexandre Julliard | c1bfca0 | 2002-03-20 22:19:06 +0000 | [diff] [blame] | 107 | dlldir = @libdir@/wine |
Alexandre Julliard | 5f10595 | 2009-08-18 11:33:26 +0200 | [diff] [blame] | 108 | fakedlldir = $(dlldir)/fakedlls |
Alexandre Julliard | d6baf1b | 1999-07-18 15:47:22 +0000 | [diff] [blame] | 109 | prog_manext = 1 |
Jon Griffiths | 35345f2 | 2003-03-15 19:48:34 +0000 | [diff] [blame] | 110 | api_manext = 3w |
Alexandre Julliard | d6baf1b | 1999-07-18 15:47:22 +0000 | [diff] [blame] | 111 | conf_manext = 5 |
Alexandre Julliard | f78a8ce | 2009-08-18 11:29:35 +0200 | [diff] [blame] | 112 | 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] | 113 | |
Alexandre Julliard | 1df72cc | 2007-02-09 14:32:36 +0100 | [diff] [blame] | 114 | IDL_GEN_C_SRCS = $(IDL_C_SRCS:.idl=_c.c) $(IDL_I_SRCS:.idl=_i.c) \ |
| 115 | $(IDL_P_SRCS:.idl=_p.c) $(IDL_S_SRCS:.idl=_s.c) |
| 116 | IDL_GEN_HEADERS = $(IDL_H_SRCS:.idl=.h) $(IDL_C_SRCS:.idl=.h) $(IDL_I_SRCS:.idl=.h) \ |
| 117 | $(IDL_P_SRCS:.idl=.h) $(IDL_S_SRCS:.idl=.h) |
Alexandre Julliard | ce25156 | 2006-12-29 12:42:25 +0100 | [diff] [blame] | 118 | |
Alexandre Julliard | b0585bf | 2007-12-10 14:26:13 +0100 | [diff] [blame] | 119 | 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] | 120 | $(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] | 121 | |
Alexandre Julliard | d6cc6ca | 2009-07-03 15:47:43 +0200 | [diff] [blame] | 122 | OBJS = $(C_SRCS:.c=.o) $(BISON_SRCS:.y=.tab.o) $(LEX_SRCS:.l=.yy.o) $(IDL_GEN_C_SRCS:.c=.o) \ |
| 123 | $(RC_SRCS:.rc=.res) $(MC_SRCS:.mc=.mc.res) $(EXTRA_OBJS) |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 124 | |
Alexandre Julliard | cce4387 | 2010-01-23 18:00:54 +0100 | [diff] [blame] | 125 | CROSSOBJS = $(OBJS:.o=.cross.o) |
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 | |
Joel Holdsworth | 66bd5f7 | 2010-04-24 14:06:11 +0100 | [diff] [blame] | 139 | .SUFFIXES: .mc .rc .mc.rc .res .idl .tlb .h .y .l .tab.c .tab.h .yy.c .ok .man.in .man _c.c _i.c _p.c _s.c .cross.o @MAINTAINER_MODE@ .sfd .ttf .svg .ico .bmp |
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 | cce4387 | 2010-01-23 18:00:54 +0100 | [diff] [blame] | 144 | .c.cross.o: |
Alexandre Julliard | 5d2b8e7 | 2010-04-08 17:29:11 +0200 | [diff] [blame] | 145 | $(CROSSCC) -c $(INCLUDES) $(DEFS) -DWINE_CROSSTEST $(CPPFLAGS) $(CFLAGS) -o $@ $< |
Alexandre Julliard | cce4387 | 2010-01-23 18:00:54 +0100 | [diff] [blame] | 146 | |
Alexandre Julliard | 9c085cb | 2006-09-09 13:16:22 +0200 | [diff] [blame] | 147 | .y.tab.c: |
Alexandre Julliard | bcdc5fb | 2006-09-11 21:47:49 +0200 | [diff] [blame] | 148 | $(BISON) $(BISONFLAGS) -p $*_ -o $@ $< |
Alexandre Julliard | 9c085cb | 2006-09-09 13:16:22 +0200 | [diff] [blame] | 149 | |
| 150 | .y.tab.h: |
Alexandre Julliard | bcdc5fb | 2006-09-11 21:47:49 +0200 | [diff] [blame] | 151 | $(BISON) $(BISONFLAGS) -p $*_ -o $*.tab.c -d $< |
Alexandre Julliard | 9c085cb | 2006-09-09 13:16:22 +0200 | [diff] [blame] | 152 | |
| 153 | .l.yy.c: |
Alexandre Julliard | 4091627 | 2007-03-08 13:19:50 +0100 | [diff] [blame] | 154 | $(FLEX) $(LEXFLAGS) -o$@ $< |
Alexandre Julliard | 9c085cb | 2006-09-09 13:16:22 +0200 | [diff] [blame] | 155 | |
Alexandre Julliard | 017a61e | 2000-11-06 05:30:48 +0000 | [diff] [blame] | 156 | .mc.mc.rc: |
Martin Fuchs | 3f44167 | 2002-10-19 17:15:00 +0000 | [diff] [blame] | 157 | $(LDPATH) $(WMC) -i -U -H /dev/null -o $@ $< |
Alexandre Julliard | f5aee67 | 2000-07-25 17:52:08 +0000 | [diff] [blame] | 158 | |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +0000 | [diff] [blame] | 159 | .rc.res: |
Dimitrie O. Paun | 1a1f9bf | 2003-05-06 18:34:53 +0000 | [diff] [blame] | 160 | $(LDPATH) $(RC) $(RCFLAGS) -fo$@ $< |
Alexandre Julliard | a845b88 | 1998-06-01 10:44:35 +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: |
Joel Holdsworth | 465e653 | 2010-05-16 23:07:57 +0100 | [diff] [blame] | 193 | CONVERT="$(CONVERT)" ICOTOOL="$(ICOTOOL)" RSVG="$(RSVG)" $(BUILDIMAGE) $< $@ |
Alexandre Julliard | dc4a475 | 2008-03-20 16:09:18 +0100 | [diff] [blame] | 194 | |
Joel Holdsworth | 66bd5f7 | 2010-04-24 14:06:11 +0100 | [diff] [blame] | 195 | .svg.bmp: |
Joel Holdsworth | 465e653 | 2010-05-16 23:07:57 +0100 | [diff] [blame] | 196 | CONVERT="$(CONVERT)" ICOTOOL="$(ICOTOOL)" RSVG="$(RSVG)" $(BUILDIMAGE) $< $@ |
Joel Holdsworth | 66bd5f7 | 2010-04-24 14:06:11 +0100 | [diff] [blame] | 197 | |
Alexandre Julliard | b0585bf | 2007-12-10 14:26:13 +0100 | [diff] [blame] | 198 | # Rules for IDL files |
| 199 | |
| 200 | dlldata.c: $(WIDL) Makefile.in |
| 201 | $(WIDL) $(IDLFLAGS) --dlldata-only --dlldata=$@ $(IDL_P_SRCS) |
| 202 | |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 203 | # Rule for linting |
| 204 | |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 205 | $(MODULE).ln : $(LINTS) |
| 206 | if test "$(LINTS)" ; \ |
| 207 | then \ |
| 208 | $(LINT) $(ALLLINTFLAGS) -o$(MODULE) $(LINTS) ; \ |
| 209 | $(MV) llib-l$(MODULE).ln $(MODULE).ln ; \ |
| 210 | else \ |
| 211 | $(LINT) $(ALLLINTFLAGS) -C$(MODULE) /dev/null ; \ |
| 212 | fi |
| 213 | |
| 214 | lint:: $(MODULE).ln |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 215 | |
Patrik Stridvall | 385dc18 | 1999-09-29 10:24:19 +0000 | [diff] [blame] | 216 | # Rules for Windows API checking |
| 217 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 218 | winapi_check:: dummy |
Patrik Stridvall | 385dc18 | 1999-09-29 10:24:19 +0000 | [diff] [blame] | 219 | $(WINAPI_CHECK) $(WINAPI_CHECK_FLAGS) $(WINAPI_CHECK_EXTRA_FLAGS) . |
| 220 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 221 | .PHONY: winapi_check |
| 222 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 223 | # Rules for dependencies |
| 224 | |
Alexandre Julliard | c6ae9a3 | 2009-12-29 12:45:37 +0100 | [diff] [blame] | 225 | DEPEND_SRCS = $(C_SRCS) $(RC_SRCS) $(MC_SRCS) \ |
Alexandre Julliard | da19122 | 2008-04-24 22:13:57 +0200 | [diff] [blame] | 226 | $(IDL_H_SRCS) $(IDL_C_SRCS) $(IDL_I_SRCS) $(IDL_P_SRCS) $(IDL_S_SRCS) \ |
| 227 | $(IDL_GEN_C_SRCS) $(IDL_TLB_SRCS) $(IDL_TLB_SRCS:.idl=.tlb) \ |
| 228 | $(BISON_SRCS) $(LEX_SRCS) $(EXTRA_SRCS) |
Alexandre Julliard | 9c085cb | 2006-09-09 13:16:22 +0200 | [diff] [blame] | 229 | |
Alexandre Julliard | 93f0339 | 2010-02-10 20:27:52 +0100 | [diff] [blame] | 230 | depend: dummy |
Francois Gouget | 7bb43a3 | 2009-06-30 10:25:19 +0200 | [diff] [blame] | 231 | $(MAKEDEP) $(MAKEDEPFLAGS) -C$(SRCDIR) -S$(TOPSRCDIR) -T$(TOPOBJDIR) $(EXTRAINCL) $(DEPEND_SRCS) |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 232 | |
Alexandre Julliard | 93f0339 | 2010-02-10 20:27:52 +0100 | [diff] [blame] | 233 | .PHONY: depend |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 234 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 235 | # Rules for cleaning |
| 236 | |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 237 | $(EXTRASUBDIRS:%=%/__clean__): dummy |
| 238 | -cd `dirname $@` && $(RM) $(CLEAN_FILES) |
| 239 | |
Alexandre Julliard | 93f0339 | 2010-02-10 20:27:52 +0100 | [diff] [blame] | 240 | clean:: $(EXTRASUBDIRS:%=%/__clean__) |
Alexandre Julliard | b64ceef | 2007-09-18 13:29:07 +0200 | [diff] [blame] | 241 | $(RM) $(CLEAN_FILES) $(CLEAN_TARGETS) $(PROGRAMS) $(MANPAGES) |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 242 | |
Alexandre Julliard | 93f0339 | 2010-02-10 20:27:52 +0100 | [diff] [blame] | 243 | .PHONY: clean $(EXTRASUBDIRS:%=%/__clean__) |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 244 | |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 245 | # Rules for installing |
| 246 | |
Alexandre Julliard | 2886e9b | 2006-08-07 17:48:18 +0200 | [diff] [blame] | 247 | $(INSTALLDIRS): |
| 248 | $(MKINSTALLDIRS) $@ |
| 249 | |
Alexandre Julliard | 93f0339 | 2010-02-10 20:27:52 +0100 | [diff] [blame] | 250 | install install-lib install-dev uninstall:: |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 251 | |
Alexandre Julliard | 93f0339 | 2010-02-10 20:27:52 +0100 | [diff] [blame] | 252 | .PHONY: install install-lib install-dev uninstall |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 253 | |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 254 | # Misc. rules |
| 255 | |
Alexandre Julliard | 017a61e | 2000-11-06 05:30:48 +0000 | [diff] [blame] | 256 | $(MC_SRCS:.mc=.mc.rc): $(WMC) |
Alexandre Julliard | f5aee67 | 2000-07-25 17:52:08 +0000 | [diff] [blame] | 257 | |
Alexandre Julliard | 1df72cc | 2007-02-09 14:32:36 +0100 | [diff] [blame] | 258 | $(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] | 259 | |
Alexandre Julliard | c6ae9a3 | 2009-12-29 12:45:37 +0100 | [diff] [blame] | 260 | $(RC_SRCS:.rc=.res) $(MC_SRCS:.mc=.mc.res): $(WRC) |
Alexandre Julliard | da19122 | 2008-04-24 22:13:57 +0200 | [diff] [blame] | 261 | |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 262 | dummy: |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 263 | |
Alexandre Julliard | 93f0339 | 2010-02-10 20:27:52 +0100 | [diff] [blame] | 264 | .PHONY: dummy |
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 | # End of global rules |