blob: 43867233de4326e4f67368b0307f5fccd6e998ed [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 Julliardb860c4a2009-09-01 22:36:13 +020035TOOLSEXT = @TOOLSEXT@
Alexandre Julliardada5e652002-12-12 22:03:14 +000036IMPLIBEXT = @IMPLIBEXT@
Alexandre Julliard2fa4f762000-10-31 00:20:51 +000037LDSHARED = @LDSHARED@
Alexandre Julliardada5e652002-12-12 22:03:14 +000038DLLTOOL = @DLLTOOL@
Hidenori Takeshimad48ca942000-12-22 22:28:00 +000039DLLWRAP = @DLLWRAP@
Rob Shearman0c694d72008-03-04 15:53:41 +000040AR = @AR@
41ARFLAGS = @ARFLAGS@
Alexandre Julliard641ee761997-08-04 16:34:36 +000042RANLIB = @RANLIB@
Alexandre Julliardfc01b722002-05-12 03:16:39 +000043STRIP = @STRIP@
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 Meissnera387aa42000-09-26 23:09:47 +000047LDFLAGS = @LDFLAGS@
Alexandre Julliardadbb0982005-08-09 11:12:29 +000048PRELINK = @PRELINK@
Alexandre Julliardff8331e1995-09-18 11:19:54 +000049RM = rm -f
Patrik Stridvalla9be64e1999-07-31 17:39:44 +000050MV = mv
Patrik Stridvalla9be64e1999-07-31 17:39:44 +000051LINT = @LINT@
52LINTFLAGS = @LINTFLAGS@
Huw Davies00acb5f2004-08-17 22:33:14 +000053FONTFORGE = @FONTFORGE@
Alexandre Julliarddc4a4752008-03-20 16:09:18 +010054RSVG = @RSVG@
55ICOTOOL = @ICOTOOL@
Alexandre Julliardf78a8ce2009-08-18 11:29:35 +020056FAKEEXT = $(DLLEXT:.so=.fake)
Alexandre Julliardfc094232003-04-14 21:46:41 +000057INCLUDES = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL)
58EXTRACFLAGS = @EXTRACFLAGS@
Mike McCormackb7443722005-08-11 17:12:18 +000059ALLCFLAGS = $(INCLUDES) $(DEFS) $(DLLFLAGS) $(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) $(MODCFLAGS)
Alexandre Julliardfc094232003-04-14 21:46:41 +000060ALLLINTFLAGS = $(INCLUDES) $(DEFS) $(LINTFLAGS)
Alexandre Julliard16cd8612003-09-24 19:01:44 +000061IDLFLAGS = $(INCLUDES) $(DEFS) $(EXTRAIDLFLAGS)
Alexandre Julliard8c846362009-01-14 12:53:42 +010062TARGETFLAGS = @TARGETFLAGS@
Alexandre Julliarda5947ff2009-02-06 20:35:56 +010063WINEBUILDFLAGS = $(TARGETFLAGS) $(DLLFLAGS)
Alexandre Julliardfc094232003-04-14 21:46:41 +000064MKINSTALLDIRS= $(TOPSRCDIR)/tools/mkinstalldirs -m 755
Hans Leidekkera7644502005-05-04 09:55:17 +000065WINAPI_CHECK = $(TOPSRCDIR)/tools/winapi/winapi_check
Alexandre Julliard35363162002-05-22 21:32:49 +000066WINEWRAPPER = $(TOPSRCDIR)/tools/winewrapper
Richard Cohen6039fb02003-07-21 22:01:07 +000067C2MAN = $(TOPSRCDIR)/tools/c2man.pl
Dimitrie O. Paune39e8a12002-11-11 20:25:54 +000068RUNTEST = $(TOPSRCDIR)/tools/runtest
Alexandre Julliardb860c4a2009-09-01 22:36:13 +020069WINEBUILD = $(TOOLSDIR)/tools/winebuild/winebuild$(TOOLSEXT)
70MAKEDEP = $(TOOLSDIR)/tools/makedep$(TOOLSEXT)
71MAKECTESTS = $(TOOLSDIR)/tools/make_ctests$(TOOLSEXT)
72WRC = $(TOOLSDIR)/tools/wrc/wrc$(TOOLSEXT)
73WMC = $(TOOLSDIR)/tools/wmc/wmc$(TOOLSEXT)
74WIDL = $(TOOLSDIR)/tools/widl/widl$(TOOLSEXT)
Alexandre Julliardbcc13792009-02-02 15:11:13 +010075WINEGCC = $(TOOLSDIR)/tools/winegcc/winegcc $(TARGETFLAGS) -B$(TOOLSDIR)/tools/winebuild --sysroot=$(TOPOBJDIR)
Alexandre Julliardb860c4a2009-09-01 22:36:13 +020076RELPATH = $(TOOLSDIR)/tools/relpath$(TOOLSEXT)
77SFNT2FNT = $(TOOLSDIR)/tools/sfnt2fnt$(TOOLSEXT)
Dimitrie O. Paun1a1f9bf2003-05-06 18:34:53 +000078RC = $(WRC)
79RC16 = $(WRC)
Alexandre Julliard49b9c762003-12-13 03:19:34 +000080RCFLAGS = --nostdinc $(INCLUDES) $(DEFS) $(EXTRARCFLAGS)
Dimitrie O. Paun1a1f9bf2003-05-06 18:34:53 +000081RC16FLAGS = -O res16 $(RCFLAGS)
Alexandre Julliard2a93f852002-12-11 01:34:51 +000082LDPATH = @LDPATH@
83DLLDIR = $(TOPOBJDIR)/dlls
Alexandre Julliard645cd6f2006-07-11 19:33:48 +020084LIBPORT = $(TOPOBJDIR)/libs/port/libwine_port.a
85LIBWPP = $(TOPOBJDIR)/libs/wpp/libwpp.a
Alexandre Julliard2d1c7902003-03-22 20:40:48 +000086LIBWINE = -L$(TOPOBJDIR)/libs/wine -lwine
Alexandre Julliard1f113332007-06-20 20:03:30 +020087LDRPATH_INSTALL = @LDRPATH_INSTALL@
88LDRPATH_LOCAL = @LDRPATH_LOCAL@
Alexandre Julliardb0182392000-12-06 00:04:10 +000089
Alexandre Julliardff8331e1995-09-18 11:19:54 +000090@SET_MAKE@
91
Alexandre Julliard641ee761997-08-04 16:34:36 +000092# Installation infos
93
Alexandre Julliardf673b712002-06-14 23:48:27 +000094INSTALL = @INSTALL@ $(INSTALL_FLAGS)
95INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(INSTALL_PROGRAM_FLAGS)
96INSTALL_SCRIPT = @INSTALL_SCRIPT@ $(INSTALL_SCRIPT_FLAGS)
97INSTALL_DATA = @INSTALL_DATA@ $(INSTALL_DATA_FLAGS)
Alexandre Julliard641ee761997-08-04 16:34:36 +000098prefix = @prefix@
99exec_prefix = @exec_prefix@
100bindir = @bindir@
101libdir = @libdir@
Alexandre Julliard74984112006-05-28 18:16:38 +0200102datarootdir = @datarootdir@
Alexandre Julliard1d8d0172002-08-02 19:34:21 +0000103datadir = @datadir@
Alexandre Julliard641ee761997-08-04 16:34:36 +0000104infodir = @infodir@
Alexandre Julliardd6baf1b1999-07-18 15:47:22 +0000105mandir = @mandir@
Alexandre Julliard9bb05fc2002-05-14 18:36:54 +0000106sysconfdir = @sysconfdir@
107includedir = @includedir@/wine
Alexandre Julliardc1bfca02002-03-20 22:19:06 +0000108dlldir = @libdir@/wine
Alexandre Julliard5f105952009-08-18 11:33:26 +0200109fakedlldir = $(dlldir)/fakedlls
Alexandre Julliardd6baf1b1999-07-18 15:47:22 +0000110prog_manext = 1
Jon Griffiths35345f22003-03-15 19:48:34 +0000111api_manext = 3w
Alexandre Julliardd6baf1b1999-07-18 15:47:22 +0000112conf_manext = 5
Alexandre Julliardf78a8ce2009-08-18 11:29:35 +0200113CLEAN_FILES = *.o *.a *.so *.ln *.res *.fake *.$(LIBEXT) \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej *.flc core
Alexandre Julliard641ee761997-08-04 16:34:36 +0000114
Alexandre Julliard1df72cc2007-02-09 14:32:36 +0100115IDL_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)
117IDL_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 Julliardce251562006-12-29 12:42:25 +0100119
Alexandre Julliardb0585bf2007-12-10 14:26:13 +0100120CLEAN_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 +0100121 $(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 +0100122
Alexandre Julliardd6cc6ca2009-07-03 15:47:43 +0200123OBJS = $(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 Julliardd7d4fdf1995-12-26 15:05:24 +0000125
Steven Edwards9138fbb2002-07-29 23:28:09 +0000126LINTS = $(C_SRCS:.c=.ln)
Patrik Stridvalla9be64e1999-07-31 17:39:44 +0000127
Alexandre Julliardd8e3d182008-04-24 12:46:43 +0200128# 'all' target first in case the enclosing Makefile didn't define any target
129
130all:
131
132filter: dummy
133 @$(TOPSRCDIR)/tools/winapi/make_filter --make $(MAKE) all
134
135.PHONY: all filter
136
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +0000137# Implicit rules
138
Alexandre Julliardc18d69e2009-06-02 13:31:22 +0200139.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 Julliardff8331e1995-09-18 11:19:54 +0000140
141.c.o:
François Gouget1c3a2422001-11-09 19:15:51 +0000142 $(CC) -c $(ALLCFLAGS) -o $@ $<
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000143
Alexandre Julliard9c085cb2006-09-09 13:16:22 +0200144.y.tab.c:
Alexandre Julliardbcdc5fb2006-09-11 21:47:49 +0200145 $(BISON) $(BISONFLAGS) -p $*_ -o $@ $<
Alexandre Julliard9c085cb2006-09-09 13:16:22 +0200146
147.y.tab.h:
Alexandre Julliardbcdc5fb2006-09-11 21:47:49 +0200148 $(BISON) $(BISONFLAGS) -p $*_ -o $*.tab.c -d $<
Alexandre Julliard9c085cb2006-09-09 13:16:22 +0200149
150.l.yy.c:
Alexandre Julliard40916272007-03-08 13:19:50 +0100151 $(FLEX) $(LEXFLAGS) -o$@ $<
Alexandre Julliard9c085cb2006-09-09 13:16:22 +0200152
Alexandre Julliard017a61e2000-11-06 05:30:48 +0000153.mc.mc.rc:
Martin Fuchs3f441672002-10-19 17:15:00 +0000154 $(LDPATH) $(WMC) -i -U -H /dev/null -o $@ $<
Alexandre Julliardf5aee672000-07-25 17:52:08 +0000155
Alexandre Julliarda845b881998-06-01 10:44:35 +0000156.rc.res:
Dimitrie O. Paun1a1f9bf2003-05-06 18:34:53 +0000157 $(LDPATH) $(RC) $(RCFLAGS) -fo$@ $<
Alexandre Julliarda845b881998-06-01 10:44:35 +0000158
Alexandre Julliard5cb97d82005-09-21 14:23:54 +0000159.spec.spec.o:
160 $(WINEBUILD) $(WINEBUILDFLAGS) --dll -o $@ --main-module $(MODULE) --export $<
Ulrich Weigand3dff7bb1999-07-11 13:58:31 +0000161
Alexandre Julliard233766a2004-09-20 21:48:42 +0000162.idl.h:
Alexandre Julliardd0629242004-10-05 04:44:20 +0000163 $(WIDL) $(IDLFLAGS) -h -H $@ $<
Alexandre Julliard233766a2004-09-20 21:48:42 +0000164
Alexandre Julliard4e67a452006-08-09 12:38:15 +0200165.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 Davies40468462005-01-28 14:13:08 +0000177.idl.tlb:
Alexandre Julliardf914b572009-05-21 11:37:34 +0200178 $(WIDL) $(TARGETFLAGS) $(IDLFLAGS) -t -T $@ $<
Huw Davies40468462005-01-28 14:13:08 +0000179
Patrik Stridvalla9be64e1999-07-31 17:39:44 +0000180.c.ln:
181 $(LINT) -c $(ALLLINTFLAGS) $< || ( $(RM) $@ && exit 1 )
182
Alexandre Julliardcaa03382002-02-20 19:03:59 +0000183.c.ok:
Alexandre Julliardedeee892002-08-09 01:22:40 +0000184 $(RUNTEST) $(RUNTESTFLAGS) $< && touch $@
Alexandre Julliardcaa03382002-02-20 19:03:59 +0000185
Huw Davies00acb5f2004-08-17 22:33:14 +0000186.sfd.ttf:
Robert Shearman8b00c3d2005-07-20 17:48:26 +0000187 $(FONTFORGE) -script $(TOPSRCDIR)/fonts/genttf.ff $< $@
Huw Davies00acb5f2004-08-17 22:33:14 +0000188
Alexandre Julliard664e4102005-10-06 16:06:04 +0000189.man.in.man:
Alexandre Julliard1716f032007-12-12 14:39:54 +0100190 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 +0000191
Alexandre Julliarddc4a4752008-03-20 16:09:18 +0100192.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 Julliardb0585bf2007-12-10 14:26:13 +0100199# Rules for IDL files
200
201dlldata.c: $(WIDL) Makefile.in
202 $(WIDL) $(IDLFLAGS) --dlldata-only --dlldata=$@ $(IDL_P_SRCS)
203
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000204# Rule for linting
205
Patrik Stridvalla9be64e1999-07-31 17:39:44 +0000206$(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
215lint:: $(MODULE).ln
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000216
Patrik Stridvall385dc181999-09-29 10:24:19 +0000217# Rules for Windows API checking
218
Alexandre Julliardf673b712002-06-14 23:48:27 +0000219winapi_check:: dummy
Patrik Stridvall385dc181999-09-29 10:24:19 +0000220 $(WINAPI_CHECK) $(WINAPI_CHECK_FLAGS) $(WINAPI_CHECK_EXTRA_FLAGS) .
221
Alexandre Julliardf673b712002-06-14 23:48:27 +0000222.PHONY: winapi_check
223
Alexandre Julliardc53ceba2000-04-09 18:19:59 +0000224# Rules for dependencies
225
Alexandre Julliardda191222008-04-24 22:13:57 +0200226DEPEND_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 Julliard9c085cb2006-09-09 13:16:22 +0200230
Alexandre Julliard3a3307d2004-10-07 03:12:44 +0000231$(SUBDIRS:%=%/__depend__): dummy
Alexandre Julliard5012c172006-08-07 13:54:09 +0200232 @cd `dirname $@` && $(MAKE) depend
Alexandre Julliardc53ceba2000-04-09 18:19:59 +0000233
Alexandre Julliarde4fca882006-09-10 22:04:42 +0200234depend: $(SUBDIRS:%=%/__depend__) dummy
Francois Gouget7bb43a32009-06-30 10:25:19 +0200235 $(MAKEDEP) $(MAKEDEPFLAGS) -C$(SRCDIR) -S$(TOPSRCDIR) -T$(TOPOBJDIR) $(EXTRAINCL) $(DEPEND_SRCS)
Alexandre Julliardc53ceba2000-04-09 18:19:59 +0000236
Alexandre Julliardf673b712002-06-14 23:48:27 +0000237.PHONY: depend $(SUBDIRS:%=%/__depend__)
238
Alexandre Julliardc53ceba2000-04-09 18:19:59 +0000239# Rules for cleaning
240
241$(SUBDIRS:%=%/__clean__): dummy
Alexandre Julliard5012c172006-08-07 13:54:09 +0200242 @cd `dirname $@` && $(MAKE) clean
Alexandre Julliardc53ceba2000-04-09 18:19:59 +0000243
244$(EXTRASUBDIRS:%=%/__clean__): dummy
245 -cd `dirname $@` && $(RM) $(CLEAN_FILES)
246
247clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__)
Alexandre Julliardb64ceef2007-09-18 13:29:07 +0200248 $(RM) $(CLEAN_FILES) $(CLEAN_TARGETS) $(PROGRAMS) $(MANPAGES)
Alexandre Julliardc53ceba2000-04-09 18:19:59 +0000249
Alexandre Julliard5cf75e62006-08-28 13:37:44 +0200250.PHONY: clean $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__)
Alexandre Julliardf673b712002-06-14 23:48:27 +0000251
Alexandre Julliard2f158c22000-06-14 21:45:38 +0000252# Rules for installing
253
Alexandre Julliard2d1c7902003-03-22 20:40:48 +0000254$(SUBDIRS:%=%/__install__): dummy
Alexandre Julliard5012c172006-08-07 13:54:09 +0200255 @cd `dirname $@` && $(MAKE) install
Alexandre Julliard2f158c22000-06-14 21:45:38 +0000256
Alexandre Julliard2d1c7902003-03-22 20:40:48 +0000257$(SUBDIRS:%=%/__install-lib__): dummy
Alexandre Julliard5012c172006-08-07 13:54:09 +0200258 @cd `dirname $@` && $(MAKE) install-lib
Alexandre Julliard2d1c7902003-03-22 20:40:48 +0000259
260$(SUBDIRS:%=%/__install-dev__): dummy
Alexandre Julliard5012c172006-08-07 13:54:09 +0200261 @cd `dirname $@` && $(MAKE) install-dev
Alexandre Julliard2d1c7902003-03-22 20:40:48 +0000262
263$(SUBDIRS:%=%/__uninstall__): dummy
Alexandre Julliard5012c172006-08-07 13:54:09 +0200264 @cd `dirname $@` && $(MAKE) uninstall
Alexandre Julliard2f158c22000-06-14 21:45:38 +0000265
Alexandre Julliard0f677a52009-03-03 16:23:16 +0100266install:: $(INSTALLSUBDIRS:%=%/__install__) dummy
267install-lib:: $(INSTALLSUBDIRS:%=%/__install-lib__) dummy
268install-dev:: $(INSTALLSUBDIRS:%=%/__install-dev__) dummy
269uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__) dummy
Alexandre Julliardf673b712002-06-14 23:48:27 +0000270
Alexandre Julliard2886e9b2006-08-07 17:48:18 +0200271$(INSTALLDIRS):
272 $(MKINSTALLDIRS) $@
273
Alexandre Julliardada5e652002-12-12 22:03:14 +0000274.PHONY: install install-lib install-dev uninstall \
Alexandre Julliard2d1c7902003-03-22 20:40:48 +0000275 $(SUBDIRS:%=%/__install__) $(SUBDIRS:%=%/__uninstall__) \
276 $(SUBDIRS:%=%/__install-lib__) $(SUBDIRS:%=%/__install-dev__)
Alexandre Julliardf673b712002-06-14 23:48:27 +0000277
Alexandre Julliardedeee892002-08-09 01:22:40 +0000278# Rules for testing
Alexandre Julliard13b0c092002-01-10 03:30:21 +0000279
Alexandre Julliard5cf75e62006-08-28 13:37:44 +0200280$(TESTSUBDIRS:%=%/__test__): dummy
Alexandre Julliardd7c606d2002-04-02 02:58:45 +0000281 @cd `dirname $@` && $(MAKE) test
282
Alexandre Julliard5cf75e62006-08-28 13:37:44 +0200283$(TESTSUBDIRS:%=%/__crosstest__): dummy
Alexandre Julliardc3c587e2002-09-06 19:46:00 +0000284 @cd `dirname $@` && $(MAKE) crosstest
285
Alexandre Julliard5cf75e62006-08-28 13:37:44 +0200286$(TESTSUBDIRS:%=%/__testclean__): dummy
287 @cd `dirname $@` && $(MAKE) testclean
288
Alexandre Julliard0f677a52009-03-03 16:23:16 +0100289check test:: $(TESTSUBDIRS:%=%/__test__) dummy
Alexandre Julliard5cf75e62006-08-28 13:37:44 +0200290
Alexandre Julliard0f677a52009-03-03 16:23:16 +0100291crosstest:: $(TESTSUBDIRS:%=%/__crosstest__) dummy
Alexandre Julliard5cf75e62006-08-28 13:37:44 +0200292
Alexandre Julliard0f677a52009-03-03 16:23:16 +0100293testclean:: $(TESTSUBDIRS:%=%/__testclean__) dummy
Alexandre Julliard5cf75e62006-08-28 13:37:44 +0200294
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 Stranzc89c2dd2009-06-05 20:57:24 -0600308$(DOCSUBDIRS:%=%/__doc_xml__): dummy
309 @cd `dirname $@` && $(MAKE) doc-xml
310
Alexandre Julliard5cf75e62006-08-28 13:37:44 +0200311man: $(DOCSUBDIRS:%=%/__man__)
312doc-html: $(DOCSUBDIRS:%=%/__doc_html__)
313doc-sgml: $(DOCSUBDIRS:%=%/__doc_sgml__)
Stefan Stranzc89c2dd2009-06-05 20:57:24 -0600314doc-xml: $(DOCSUBDIRS:%=%/__doc_xml__)
Alexandre Julliard5cf75e62006-08-28 13:37:44 +0200315
Stefan Stranzc89c2dd2009-06-05 20:57:24 -0600316.PHONY: man doc-html doc-sgml doc-xml $(DOCSUBDIRS:%=%/__man__) $(DOCSUBDIRS:%=%/__doc_html__) $(DOCSUBDIRS:%=%/__doc_sgml__) $(DOCSUBDIRS:%=%/__doc_xml__)
Alexandre Julliardf673b712002-06-14 23:48:27 +0000317
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +0000318# Misc. rules
319
Alexandre Julliard017a61e2000-11-06 05:30:48 +0000320$(MC_SRCS:.mc=.mc.rc): $(WMC)
Alexandre Julliardf5aee672000-07-25 17:52:08 +0000321
Alexandre Julliard1df72cc2007-02-09 14:32:36 +0100322$(IDL_GEN_HEADERS) $(IDL_GEN_C_SRCS) $(IDL_TLB_SRCS:.idl=.tlb): $(WIDL)
Vincent BĂ©ron860c84b2005-02-08 12:13:10 +0000323
Alexandre Julliardd6cc6ca2009-07-03 15:47:43 +0200324$(RC_SRCS:.rc=.res) $(MC_SRCS:.mc=.mc.res) $(RC_SRCS16:.rc=.res): $(WRC)
Alexandre Julliardda191222008-04-24 22:13:57 +0200325
Alexandre Julliardc53ceba2000-04-09 18:19:59 +0000326$(SUBDIRS): dummy
327 @cd $@ && $(MAKE)
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000328
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000329dummy:
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +0000330
Alexandre Julliardf673b712002-06-14 23:48:27 +0000331.PHONY: dummy $(SUBDIRS)
332
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +0000333# End of global rules