blob: d49d2a36446f0585f616d52058d5fa793f565eac [file] [log] [blame]
Alexandre Julliard139a4b11996-11-02 14:24:07 +00001# Global rules shared by all makefiles -*-Makefile-*-
Alexandre Julliardbf9130a1996-10-13 17:45:47 +00002#
Alexandre Julliardc53ceba2000-04-09 18:19:59 +00003# Each individual makefile must define the following variables:
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +00004# 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 Julliardc53ceba2000-04-09 18:19:59 +00008#
9# Each individual makefile may define the following additional variables:
10# C_SRCS : C sources for the module
Alexandre Julliardc728efc2002-10-02 02:34:09 +000011# C_SRCS16 : 16-bit C sources for the module
Alexandre Julliardc53ceba2000-04-09 18:19:59 +000012# RC_SRCS : resource source files
Alexandre Julliardc53ceba2000-04-09 18:19:59 +000013# EXTRA_SRCS : extra source files for make depend
14# EXTRA_OBJS : extra object files
Alexandre Julliard32459912002-05-09 00:05:48 +000015# IMPORTS : dlls to import
16# DELAYIMPORTS : dlls to import in delayed mode
Alexandre Julliardc53ceba2000-04-09 18:19:59 +000017# SUBDIRS : subdirectories that contain a Makefile
18# EXTRASUBDIRS : subdirectories that do not contain a Makefile
Alexandre Julliardf673b712002-06-14 23:48:27 +000019# INSTALLSUBDIRS : subdirectories to run make install/uninstall into
Mike McCormackb7443722005-08-11 17:12:18 +000020# MODCFLAGS : extra CFLAGS for this module
Alexandre Julliardff8331e1995-09-18 11:19:54 +000021
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000022# First some useful definitions
23
Alexandre Julliard8664b891996-04-05 14:58:24 +000024SHELL = /bin/sh
25CC = @CC@
Alexandre Julliardfc094232003-04-14 21:46:41 +000026CFLAGS = @CFLAGS@
Alexandre Julliard15566392003-06-13 23:26:01 +000027CPPFLAGS = @CPPFLAGS@
Alexandre Julliard02e90081998-01-04 17:49:09 +000028LIBS = @LIBS@
Mike McCormackc068f672004-03-16 03:11:39 +000029BISON = @BISON@
Alexandre Julliard40916272007-03-08 13:19:50 +010030FLEX = @FLEX@
Alexandre Julliardfc01b722002-05-12 03:16:39 +000031EXEEXT = @EXEEXT@
32OBJEXT = @OBJEXT@
Alexandre Julliard2fa4f762000-10-31 00:20:51 +000033LIBEXT = @LIBEXT@
Alexandre Julliardc1bfca02002-03-20 22:19:06 +000034DLLEXT = @DLLEXT@
Alexandre Julliardada5e652002-12-12 22:03:14 +000035IMPLIBEXT = @IMPLIBEXT@
Alexandre Julliard2fa4f762000-10-31 00:20:51 +000036LDSHARED = @LDSHARED@
Alexandre Julliardada5e652002-12-12 22:03:14 +000037DLLTOOL = @DLLTOOL@
Hidenori Takeshimad48ca942000-12-22 22:28:00 +000038DLLWRAP = @DLLWRAP@
Rob Shearman0c694d72008-03-04 15:53:41 +000039AR = @AR@
40ARFLAGS = @ARFLAGS@
Alexandre Julliard641ee761997-08-04 16:34:36 +000041RANLIB = @RANLIB@
Alexandre Julliardfc01b722002-05-12 03:16:39 +000042STRIP = @STRIP@
43WINDRES = @WINDRES@
Alexandre Julliarddf234a92002-05-22 02:10:39 +000044LN = @LN@
Alexandre Julliard641ee761997-08-04 16:34:36 +000045LN_S = @LN_S@
Alexandre Julliardfc01b722002-05-12 03:16:39 +000046TOOLSDIR = @TOOLSDIR@
Marcus Meissner1d4db782003-01-09 00:46:54 +000047AS = @AS@
Alexandre Julliardeb5f89c2002-05-24 21:22:10 +000048LD = @LD@
Francois Gouget86bd0462008-06-26 14:05:57 +020049NM = @NM@
Marcus Meissnera387aa42000-09-26 23:09:47 +000050LDFLAGS = @LDFLAGS@
Alexandre Julliardadbb0982005-08-09 11:12:29 +000051PRELINK = @PRELINK@
Alexandre Julliardff8331e1995-09-18 11:19:54 +000052RM = rm -f
Patrik Stridvalla9be64e1999-07-31 17:39:44 +000053MV = mv
Patrik Stridvalla9be64e1999-07-31 17:39:44 +000054LINT = @LINT@
55LINTFLAGS = @LINTFLAGS@
Huw Davies00acb5f2004-08-17 22:33:14 +000056FONTFORGE = @FONTFORGE@
Alexandre Julliarddc4a4752008-03-20 16:09:18 +010057RSVG = @RSVG@
58ICOTOOL = @ICOTOOL@
Alexandre Julliardfc094232003-04-14 21:46:41 +000059INCLUDES = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL)
60EXTRACFLAGS = @EXTRACFLAGS@
Mike McCormackb7443722005-08-11 17:12:18 +000061ALLCFLAGS = $(INCLUDES) $(DEFS) $(DLLFLAGS) $(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) $(MODCFLAGS)
Alexandre Julliardfc094232003-04-14 21:46:41 +000062ALLLINTFLAGS = $(INCLUDES) $(DEFS) $(LINTFLAGS)
Alexandre Julliard16cd8612003-09-24 19:01:44 +000063IDLFLAGS = $(INCLUDES) $(DEFS) $(EXTRAIDLFLAGS)
Alexandre Julliard5cb97d82005-09-21 14:23:54 +000064WINEBUILDFLAGS = $(DLLFLAGS) --as-cmd "$(AS)"
Alexandre Julliardfc094232003-04-14 21:46:41 +000065MKINSTALLDIRS= $(TOPSRCDIR)/tools/mkinstalldirs -m 755
Hans Leidekkera7644502005-05-04 09:55:17 +000066WINAPI_CHECK = $(TOPSRCDIR)/tools/winapi/winapi_check
Alexandre Julliard35363162002-05-22 21:32:49 +000067WINEWRAPPER = $(TOPSRCDIR)/tools/winewrapper
Richard Cohen6039fb02003-07-21 22:01:07 +000068C2MAN = $(TOPSRCDIR)/tools/c2man.pl
Dimitrie O. Paune39e8a12002-11-11 20:25:54 +000069RUNTEST = $(TOPSRCDIR)/tools/runtest
Alexandre Julliardfc01b722002-05-12 03:16:39 +000070WINEBUILD = $(TOOLSDIR)/tools/winebuild/winebuild
71MAKEDEP = $(TOOLSDIR)/tools/makedep
Alexandre Julliardbcb75912005-03-16 20:02:17 +000072MAKECTESTS = $(TOOLSDIR)/tools/make_ctests
Alexandre Julliardfc01b722002-05-12 03:16:39 +000073WRC = $(TOOLSDIR)/tools/wrc/wrc
74WMC = $(TOOLSDIR)/tools/wmc/wmc
Alexandre Julliarded2f8fc2002-12-03 23:36:05 +000075WIDL = $(TOOLSDIR)/tools/widl/widl
Alexandre Julliardccc3d662004-03-02 06:58:21 +000076WINEGCC = $(TOOLSDIR)/tools/winegcc/winegcc
Alexandre Julliard35842ca2006-02-17 11:42:17 +010077RELPATH = $(TOOLSDIR)/tools/relpath
Huw Davies00acb5f2004-08-17 22:33:14 +000078SFNT2FNT = $(TOOLSDIR)/tools/sfnt2fnt
79FNT2FON = $(TOOLSDIR)/tools/fnt2fon
Dimitrie O. Paun1a1f9bf2003-05-06 18:34:53 +000080RC = $(WRC)
81RC16 = $(WRC)
Alexandre Julliard49b9c762003-12-13 03:19:34 +000082RCFLAGS = --nostdinc $(INCLUDES) $(DEFS) $(EXTRARCFLAGS)
Dimitrie O. Paun1a1f9bf2003-05-06 18:34:53 +000083RC16FLAGS = -O res16 $(RCFLAGS)
Alexandre Julliard2a93f852002-12-11 01:34:51 +000084LDPATH = @LDPATH@
85DLLDIR = $(TOPOBJDIR)/dlls
Alexandre Julliard645cd6f2006-07-11 19:33:48 +020086LIBPORT = $(TOPOBJDIR)/libs/port/libwine_port.a
87LIBWPP = $(TOPOBJDIR)/libs/wpp/libwpp.a
Alexandre Julliard2d1c7902003-03-22 20:40:48 +000088LIBWINE = -L$(TOPOBJDIR)/libs/wine -lwine
Alexandre Julliard1f113332007-06-20 20:03:30 +020089LDRPATH_INSTALL = @LDRPATH_INSTALL@
90LDRPATH_LOCAL = @LDRPATH_LOCAL@
Alexandre Julliardb0182392000-12-06 00:04:10 +000091
Alexandre Julliardff8331e1995-09-18 11:19:54 +000092@SET_MAKE@
93
Alexandre Julliard641ee761997-08-04 16:34:36 +000094# Installation infos
95
Alexandre Julliardf673b712002-06-14 23:48:27 +000096INSTALL = @INSTALL@ $(INSTALL_FLAGS)
97INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(INSTALL_PROGRAM_FLAGS)
98INSTALL_SCRIPT = @INSTALL_SCRIPT@ $(INSTALL_SCRIPT_FLAGS)
99INSTALL_DATA = @INSTALL_DATA@ $(INSTALL_DATA_FLAGS)
Alexandre Julliard641ee761997-08-04 16:34:36 +0000100prefix = @prefix@
101exec_prefix = @exec_prefix@
102bindir = @bindir@
103libdir = @libdir@
Alexandre Julliard74984112006-05-28 18:16:38 +0200104datarootdir = @datarootdir@
Alexandre Julliard1d8d0172002-08-02 19:34:21 +0000105datadir = @datadir@
Alexandre Julliard641ee761997-08-04 16:34:36 +0000106infodir = @infodir@
Alexandre Julliardd6baf1b1999-07-18 15:47:22 +0000107mandir = @mandir@
Alexandre Julliard9bb05fc2002-05-14 18:36:54 +0000108sysconfdir = @sysconfdir@
109includedir = @includedir@/wine
Alexandre Julliardc1bfca02002-03-20 22:19:06 +0000110dlldir = @libdir@/wine
Alexandre Julliardd6baf1b1999-07-18 15:47:22 +0000111prog_manext = 1
Jon Griffiths35345f22003-03-15 19:48:34 +0000112api_manext = 3w
Alexandre Julliardd6baf1b1999-07-18 15:47:22 +0000113conf_manext = 5
Alexandre Julliard1137f4b2008-03-13 11:47:23 +0100114CLEAN_FILES = *.o *.a *.so *.ln *.res *.$(LIBEXT) \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej *.flc core
Alexandre Julliard641ee761997-08-04 16:34:36 +0000115
Alexandre Julliard1df72cc2007-02-09 14:32:36 +0100116IDL_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)
118IDL_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 Julliardce251562006-12-29 12:42:25 +0100120
Alexandre Julliardb0585bf2007-12-10 14:26:13 +0100121CLEAN_TARGETS = $(IDL_GEN_C_SRCS) $(IDL_GEN_HEADERS) $(IDL_TLB_SRCS:.idl=.tlb) $(IDL_P_SRCS:%=dlldata.c) \
Alexandre Julliard1137f4b2008-03-13 11:47:23 +0100122 $(BISON_SRCS:.y=.tab.c) $(BISON_SRCS:.y=.tab.h) $(LEX_SRCS:.l=.yy.c) $(MC_SRCS:.mc=.mc.rc)
Alexandre Julliardce251562006-12-29 12:42:25 +0100123
Alexandre Julliard12c19622006-10-16 17:20:37 +0200124OBJS = $(C_SRCS:.c=.o) $(BISON_SRCS:.y=.tab.o) $(LEX_SRCS:.l=.yy.o) $(IDL_GEN_C_SRCS:.c=.o) $(EXTRA_OBJS)
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +0000125
Steven Edwards9138fbb2002-07-29 23:28:09 +0000126RCOBJS = $(RC_SRCS:.rc=.res.o)
127LINTS = $(C_SRCS:.c=.ln)
Patrik Stridvalla9be64e1999-07-31 17:39:44 +0000128
Alexandre Julliardd8e3d182008-04-24 12:46:43 +0200129# 'all' target first in case the enclosing Makefile didn't define any target
130
131all:
132
133filter: dummy
134 @$(TOPSRCDIR)/tools/winapi/make_filter --make $(MAKE) all
135
136.PHONY: all filter
137
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +0000138# Implicit rules
139
Alexandre Julliard8ad60492008-03-22 21:23:56 +0100140.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 Julliardff8331e1995-09-18 11:19:54 +0000141
142.c.o:
François Gouget1c3a2422001-11-09 19:15:51 +0000143 $(CC) -c $(ALLCFLAGS) -o $@ $<
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000144
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000145.s.o:
François Gouget1c3a2422001-11-09 19:15:51 +0000146 $(AS) -o $@ $<
Alexandre Julliard7e6ae4b1996-12-08 19:25:27 +0000147
Alexandre Julliard9c085cb2006-09-09 13:16:22 +0200148.y.tab.c:
Alexandre Julliardbcdc5fb2006-09-11 21:47:49 +0200149 $(BISON) $(BISONFLAGS) -p $*_ -o $@ $<
Alexandre Julliard9c085cb2006-09-09 13:16:22 +0200150
151.y.tab.h:
Alexandre Julliardbcdc5fb2006-09-11 21:47:49 +0200152 $(BISON) $(BISONFLAGS) -p $*_ -o $*.tab.c -d $<
Alexandre Julliard9c085cb2006-09-09 13:16:22 +0200153
154.l.yy.c:
Alexandre Julliard40916272007-03-08 13:19:50 +0100155 $(FLEX) $(LEXFLAGS) -o$@ $<
Alexandre Julliard9c085cb2006-09-09 13:16:22 +0200156
Alexandre Julliard017a61e2000-11-06 05:30:48 +0000157.mc.mc.rc:
Martin Fuchs3f441672002-10-19 17:15:00 +0000158 $(LDPATH) $(WMC) -i -U -H /dev/null -o $@ $<
Alexandre Julliardf5aee672000-07-25 17:52:08 +0000159
Alexandre Julliarda845b881998-06-01 10:44:35 +0000160.rc.res:
Dimitrie O. Paun1a1f9bf2003-05-06 18:34:53 +0000161 $(LDPATH) $(RC) $(RCFLAGS) -fo$@ $<
Alexandre Julliarda845b881998-06-01 10:44:35 +0000162
Alexandre Julliardfc01b722002-05-12 03:16:39 +0000163.res.res.o:
164 $(WINDRES) -i $< -o $@
165
Alexandre Julliard5cb97d82005-09-21 14:23:54 +0000166.spec.spec.o:
167 $(WINEBUILD) $(WINEBUILDFLAGS) --dll -o $@ --main-module $(MODULE) --export $<
Ulrich Weigand3dff7bb1999-07-11 13:58:31 +0000168
Alexandre Julliard233766a2004-09-20 21:48:42 +0000169.idl.h:
Alexandre Julliardd0629242004-10-05 04:44:20 +0000170 $(WIDL) $(IDLFLAGS) -h -H $@ $<
Alexandre Julliard233766a2004-09-20 21:48:42 +0000171
Alexandre Julliard4e67a452006-08-09 12:38:15 +0200172.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 Davies40468462005-01-28 14:13:08 +0000184.idl.tlb:
185 $(WIDL) $(IDLFLAGS) -t -T $@ $<
186
Patrik Stridvalla9be64e1999-07-31 17:39:44 +0000187.c.ln:
188 $(LINT) -c $(ALLLINTFLAGS) $< || ( $(RM) $@ && exit 1 )
189
Alexandre Julliardcaa03382002-02-20 19:03:59 +0000190.c.ok:
Alexandre Julliardedeee892002-08-09 01:22:40 +0000191 $(RUNTEST) $(RUNTESTFLAGS) $< && touch $@
Alexandre Julliardcaa03382002-02-20 19:03:59 +0000192
Huw Davies00acb5f2004-08-17 22:33:14 +0000193.sfd.ttf:
Robert Shearman8b00c3d2005-07-20 17:48:26 +0000194 $(FONTFORGE) -script $(TOPSRCDIR)/fonts/genttf.ff $< $@
Huw Davies00acb5f2004-08-17 22:33:14 +0000195
Alexandre Julliard664e4102005-10-06 16:06:04 +0000196.man.in.man:
Alexandre Julliard1716f032007-12-12 14:39:54 +0100197 LC_ALL=C sed -e 's,@bindir\@,$(bindir),g' -e 's,@dlldir\@,$(dlldir),g' -e 's,@PACKAGE_STRING\@,@PACKAGE_STRING@,g' $< >$@ || ($(RM) $@ && false)
Alexandre Julliard664e4102005-10-06 16:06:04 +0000198
Alexandre Julliarddc4a4752008-03-20 16:09:18 +0100199.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 Julliardb0585bf2007-12-10 14:26:13 +0100206# Rules for IDL files
207
208dlldata.c: $(WIDL) Makefile.in
209 $(WIDL) $(IDLFLAGS) --dlldata-only --dlldata=$@ $(IDL_P_SRCS)
210
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000211# Rule for linting
212
Patrik Stridvalla9be64e1999-07-31 17:39:44 +0000213$(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
222lint:: $(MODULE).ln
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000223
Patrik Stridvall385dc181999-09-29 10:24:19 +0000224# Rules for Windows API checking
225
Alexandre Julliardf673b712002-06-14 23:48:27 +0000226winapi_check:: dummy
Patrik Stridvall385dc181999-09-29 10:24:19 +0000227 $(WINAPI_CHECK) $(WINAPI_CHECK_FLAGS) $(WINAPI_CHECK_EXTRA_FLAGS) .
228
Alexandre Julliardf673b712002-06-14 23:48:27 +0000229.PHONY: winapi_check
230
Alexandre Julliardc53ceba2000-04-09 18:19:59 +0000231# Rules for dependencies
232
Alexandre Julliardda191222008-04-24 22:13:57 +0200233DEPEND_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 Julliard9c085cb2006-09-09 13:16:22 +0200237
Alexandre Julliard3a3307d2004-10-07 03:12:44 +0000238$(SUBDIRS:%=%/__depend__): dummy
Alexandre Julliard5012c172006-08-07 13:54:09 +0200239 @cd `dirname $@` && $(MAKE) depend
Alexandre Julliardc53ceba2000-04-09 18:19:59 +0000240
Alexandre Julliarde4fca882006-09-10 22:04:42 +0200241depend: $(SUBDIRS:%=%/__depend__) dummy
Alexandre Julliard9c085cb2006-09-09 13:16:22 +0200242 $(MAKEDEP) -C$(SRCDIR) -S$(TOPSRCDIR) -T$(TOPOBJDIR) $(EXTRAINCL) $(DEPEND_SRCS)
Alexandre Julliardc53ceba2000-04-09 18:19:59 +0000243
Alexandre Julliardf673b712002-06-14 23:48:27 +0000244.PHONY: depend $(SUBDIRS:%=%/__depend__)
245
Alexandre Julliardc53ceba2000-04-09 18:19:59 +0000246# Rules for cleaning
247
248$(SUBDIRS:%=%/__clean__): dummy
Alexandre Julliard5012c172006-08-07 13:54:09 +0200249 @cd `dirname $@` && $(MAKE) clean
Alexandre Julliardc53ceba2000-04-09 18:19:59 +0000250
251$(EXTRASUBDIRS:%=%/__clean__): dummy
252 -cd `dirname $@` && $(RM) $(CLEAN_FILES)
253
254clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__)
Alexandre Julliardb64ceef2007-09-18 13:29:07 +0200255 $(RM) $(CLEAN_FILES) $(CLEAN_TARGETS) $(PROGRAMS) $(MANPAGES)
Alexandre Julliardc53ceba2000-04-09 18:19:59 +0000256
Alexandre Julliard5cf75e62006-08-28 13:37:44 +0200257.PHONY: clean $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__)
Alexandre Julliardf673b712002-06-14 23:48:27 +0000258
Alexandre Julliard2f158c22000-06-14 21:45:38 +0000259# Rules for installing
260
Alexandre Julliard2d1c7902003-03-22 20:40:48 +0000261$(SUBDIRS:%=%/__install__): dummy
Alexandre Julliard5012c172006-08-07 13:54:09 +0200262 @cd `dirname $@` && $(MAKE) install
Alexandre Julliard2f158c22000-06-14 21:45:38 +0000263
Alexandre Julliard2d1c7902003-03-22 20:40:48 +0000264$(SUBDIRS:%=%/__install-lib__): dummy
Alexandre Julliard5012c172006-08-07 13:54:09 +0200265 @cd `dirname $@` && $(MAKE) install-lib
Alexandre Julliard2d1c7902003-03-22 20:40:48 +0000266
267$(SUBDIRS:%=%/__install-dev__): dummy
Alexandre Julliard5012c172006-08-07 13:54:09 +0200268 @cd `dirname $@` && $(MAKE) install-dev
Alexandre Julliard2d1c7902003-03-22 20:40:48 +0000269
270$(SUBDIRS:%=%/__uninstall__): dummy
Alexandre Julliard5012c172006-08-07 13:54:09 +0200271 @cd `dirname $@` && $(MAKE) uninstall
Alexandre Julliard2f158c22000-06-14 21:45:38 +0000272
Alexandre Julliardf673b712002-06-14 23:48:27 +0000273install:: $(INSTALLSUBDIRS:%=%/__install__)
Alexandre Julliardb3ec2e52008-08-25 14:27:03 +0200274install-lib:: $(INSTALLSUBDIRS:%=%/__install-lib__)
275install-dev:: $(INSTALLSUBDIRS:%=%/__install-dev__)
Alexandre Julliardf673b712002-06-14 23:48:27 +0000276uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__)
277
Alexandre Julliard2886e9b2006-08-07 17:48:18 +0200278$(INSTALLDIRS):
279 $(MKINSTALLDIRS) $@
280
Alexandre Julliardada5e652002-12-12 22:03:14 +0000281.PHONY: install install-lib install-dev uninstall \
Alexandre Julliard2d1c7902003-03-22 20:40:48 +0000282 $(SUBDIRS:%=%/__install__) $(SUBDIRS:%=%/__uninstall__) \
283 $(SUBDIRS:%=%/__install-lib__) $(SUBDIRS:%=%/__install-dev__)
Alexandre Julliardf673b712002-06-14 23:48:27 +0000284
Alexandre Julliardedeee892002-08-09 01:22:40 +0000285# Rules for testing
Alexandre Julliard13b0c092002-01-10 03:30:21 +0000286
Alexandre Julliard5cf75e62006-08-28 13:37:44 +0200287$(TESTSUBDIRS:%=%/__test__): dummy
Alexandre Julliardd7c606d2002-04-02 02:58:45 +0000288 @cd `dirname $@` && $(MAKE) test
289
Alexandre Julliard5cf75e62006-08-28 13:37:44 +0200290$(TESTSUBDIRS:%=%/__crosstest__): dummy
Alexandre Julliardc3c587e2002-09-06 19:46:00 +0000291 @cd `dirname $@` && $(MAKE) crosstest
292
Alexandre Julliard5cf75e62006-08-28 13:37:44 +0200293$(TESTSUBDIRS:%=%/__testclean__): dummy
294 @cd `dirname $@` && $(MAKE) testclean
295
296check test:: $(TESTSUBDIRS:%=%/__test__)
297
298crosstest:: $(TESTSUBDIRS:%=%/__crosstest__)
299
300testclean:: $(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
315man: $(DOCSUBDIRS:%=%/__man__)
316doc-html: $(DOCSUBDIRS:%=%/__doc_html__)
317doc-sgml: $(DOCSUBDIRS:%=%/__doc_sgml__)
318
319.PHONY: man doc-html doc-sgml $(DOCSUBDIRS:%=%/__man__) $(DOCSUBDIRS:%=%/__doc_html__) $(DOCSUBDIRS:%=%/__doc_sgml__)
Alexandre Julliardf673b712002-06-14 23:48:27 +0000320
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +0000321# Misc. rules
322
Alexandre Julliard017a61e2000-11-06 05:30:48 +0000323$(MC_SRCS:.mc=.mc.rc): $(WMC)
Alexandre Julliardf5aee672000-07-25 17:52:08 +0000324
Alexandre Julliard1df72cc2007-02-09 14:32:36 +0100325$(IDL_GEN_HEADERS) $(IDL_GEN_C_SRCS) $(IDL_TLB_SRCS:.idl=.tlb): $(WIDL)
Vincent BĂ©ron860c84b2005-02-08 12:13:10 +0000326
Alexandre Julliardda191222008-04-24 22:13:57 +0200327$(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res): $(WRC)
328
Alexandre Julliardc53ceba2000-04-09 18:19:59 +0000329$(SUBDIRS): dummy
330 @cd $@ && $(MAKE)
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000331
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000332dummy:
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +0000333
Alexandre Julliardf673b712002-06-14 23:48:27 +0000334.PHONY: dummy $(SUBDIRS)
335
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +0000336# End of global rules