7 IMPORTS = shell32 comctl32 msimg32 ole32 user32 gdi32 kernel32 advapi32 oleaut32
8 EXTRADEFS = -D__WINE__ -D_WIN32_IE=0x0600 -D_WIN32_WINNT=0x0501 -DWINVER=0x0500 -D__MINGW32__ -DCINTERFACE
9 EXTRA_OBJS = notifyhook.dll libexpat.dll
10 EXTRALIBS = $(LIBUUID)
19 utility/shellclasses.cpp \
22 utility/dragdropimpl.cpp \
23 utility/shellbrowserimpl.cpp \
24 utility/xmlstorage.cpp \
32 shell/shellbrowser.cpp \
37 services/shellservices.cpp \
38 taskbar/desktopbar.cpp \
40 taskbar/startmenu.cpp \
41 taskbar/traynotify.cpp \
42 taskbar/quicklaunch.cpp \
43 taskbar/favorites.cpp \
44 dialogs/searchprogram.cpp \
47 RC_SRCS = explorer_intres.rc
48 EXTRARCFLAGS = -D__WRC__ -D_WIN32
51 # Global rules for building a Winelib program -*-Makefile-*-
53 # Each individual makefile should define the following variables:
54 # MODULE : name of the main module being built
55 # APPMODE : program mode (cui,gui,cuiw,guiw)
56 # EXTRALIBS : extra libraries to link in (optional)
57 # EXTRADEFS : extra symbol definitions, like -DWINELIB (optional)
59 # plus all variables required by the global Make.rules.in
62 DEFS = -D_REENTRANT -fPIC $(EXTRADEFS)
63 LDDLLFLAGS = -Wl,-Bsymbolic,-z,defs
64 ALL_OBJS = $(OBJS) $(MODULE).dbg.o
65 ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBPORT) $(LDFLAGS) $(LIBS)
66 BASEMODULE = $(MODULE:.exe=)
67 TESTIMPORTS = $(DELAYIMPORTS) $(IMPORTS)
68 RUNTESTFLAGS= -q -P wine -T $(TOPOBJDIR) $(PLTESTPROGRAM:%=-p %)
71 # Global rules shared by all makefiles -*-Makefile-*-
73 # Each individual makefile must define the following variables:
74 # TOPSRCDIR : top-level source directory
75 # TOPOBJDIR : top-level object directory
76 # SRCDIR : source directory for this module
77 # MODULE : name of the module being built
79 # Each individual makefile may define the following additional variables:
80 # C_SRCS : C sources for the module
81 # CPP_SRCS : C++ sources for the module
82 # C_SRCS16 : 16-bit C sources for the module
83 # RC_SRCS : resource source files
84 # EXTRA_SRCS : extra source files for make depend
85 # EXTRA_OBJS : extra object files
86 # IMPORTS : dlls to import
87 # DELAYIMPORTS : dlls to import in delayed mode
88 # SUBDIRS : subdirectories that contain a Makefile
89 # EXTRASUBDIRS : subdirectories that do not contain a Makefile
90 # INSTALLSUBDIRS : subdirectories to run make install/uninstall into
92 # First some useful definitions
110 LDSHARED = $(CC) -shared $(SONAME:%=-Wl,-soname,%)
116 WINDRES = mingw32-windres
119 TOOLSDIR = $(TOPOBJDIR)
128 INCLUDES = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL)
129 EXTRACFLAGS = -mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+ -Wpointer-arith
130 ALLCFLAGS = $(INCLUDES) $(DEFS) $(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS)
131 ALLLINTFLAGS = $(INCLUDES) $(DEFS) $(LINTFLAGS)
132 MKINSTALLDIRS= $(TOPSRCDIR)/tools/mkinstalldirs -m 755
133 WINAPI_CHECK = $(TOPSRCDIR)/tools/winapi_check/winapi_check
134 WINEWRAPPER = $(TOPSRCDIR)/tools/winewrapper
135 C2MAN = $(TOPSRCDIR)/tools/c2man.pl
136 RUNTEST = $(TOPSRCDIR)/tools/runtest
137 WINEBUILD = $(TOOLSDIR)/tools/winebuild/winebuild
138 MAKEDEP = $(TOOLSDIR)/tools/makedep
139 WRC = $(TOOLSDIR)/tools/wrc/wrc
140 WMC = $(TOOLSDIR)/tools/wmc/wmc
141 WIDL = $(TOOLSDIR)/tools/widl/widl
144 RCFLAGS = --nostdinc $(INCLUDES) $(EXTRARCFLAGS)
145 RC16FLAGS = -O res16 $(RCFLAGS)
146 LDPATH = LD_LIBRARY_PATH="$(TOOLSDIR)/libs/unicode:$$LD_LIBRARY_PATH"
147 DLLDIR = $(TOPOBJDIR)/dlls
148 LIBDIR = $(TOPOBJDIR)/libs
149 LIBPORT = -L$(TOPOBJDIR)/libs/port -lwine_port
150 LIBUNICODE = -L$(TOPOBJDIR)/libs/unicode -lwine_unicode
151 LIBUUID = -L$(TOPOBJDIR)/libs/uuid -lwine_uuid
152 LIBWINE = -L$(TOPOBJDIR)/libs/wine -lwine
158 INSTALL = /usr/bin/install -c $(INSTALL_FLAGS)
159 INSTALL_PROGRAM = ${INSTALL} $(INSTALL_PROGRAM_FLAGS)
160 INSTALL_SCRIPT = ${INSTALL} $(INSTALL_SCRIPT_FLAGS)
161 INSTALL_DATA = ${INSTALL} -m 644 $(INSTALL_DATA_FLAGS)
163 exec_prefix = ${prefix}
164 bindir = ${exec_prefix}/bin
165 libdir = ${exec_prefix}/lib
166 datadir = ${prefix}/share
167 infodir = ${prefix}/info
168 mandir = ${prefix}/man
169 sysconfdir = ${prefix}/etc
170 includedir = ${prefix}/include/wine
171 dlldir = ${exec_prefix}/lib/wine
175 CLEAN_FILES = *.o *.a *.so *.ln *.$(LIBEXT) \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej \
176 *.flc *.spec.c *.spec.def *.dbg.c y.tab.c y.tab.h lex.yy.c core */*.o
178 OBJS = $(C_SRCS:.c=.o) $(CPP_SRCS:.cpp=.o) $(EXTRA_OBJS)
180 RCOBJS = $(RC_SRCS:.rc=.res.o)
181 LINTS = $(C_SRCS:.c=.ln) $(CPP_SRCS:.cpp=.ln)
185 .SUFFIXES: .mc .rc .mc.rc .res .res.o .coff .spec .spec.c .spec.def .ok
188 $(CC) -c $(ALLCFLAGS) -o $@ $<
191 $(CXX) -c $(ALLCFLAGS) -o $@ $<
197 $(LDPATH) $(WMC) -i -U -H /dev/null -o $@ $<
200 $(LDPATH) $(RC) $(RCFLAGS) -fo$@ $<
203 $(WINDRES) -i $< -o $@
206 $(WINDRES) -i $< -o $@
209 $(WINEBUILD) $(DEFS) -o $@ --main-module $(MODULE) --spec $<
212 $(WINEBUILD) $(DEFS) -o $@ --def $<
215 $(LINT) -c $(ALLLINTFLAGS) $< || ( $(RM) $@ && exit 1 )
218 $(RUNTEST) $(RUNTESTFLAGS) $< && touch $@
220 # 'all' target first in case the enclosing Makefile didn't define any target
225 @$(TOPSRCDIR)/tools/winapi/make_filter --make $(MAKE) all
229 # Rule for main module debug channels
231 $(MODULE).dbg.c: $(C_SRCS) $(CPP_SRCS) $(C_SRCS16) $(WINEBUILD)
232 $(WINEBUILD) $(DEFS) -o $@ --debug -C$(SRCDIR) $(C_SRCS) $(CPP_SRCS) $(C_SRCS16)
234 # Rule to rebuild the tools
237 cd $(TOOLSDIR)/tools && $(MAKE) `basename $@`
241 Makefile: Makefile.in $(TOPSRCDIR)/configure
242 @echo Makefile is older than $?, please rerun $(TOPSRCDIR)/configure
247 $(MODULE).ln : $(LINTS)
248 if test "$(LINTS)" ; \
250 $(LINT) $(ALLLINTFLAGS) -o$(MODULE) $(LINTS) ; \
251 $(MV) llib-l$(MODULE).ln $(MODULE).ln ; \
253 $(LINT) $(ALLLINTFLAGS) -C$(MODULE) /dev/null ; \
258 # Rules for Windows API checking
261 $(WINAPI_CHECK) $(WINAPI_CHECK_FLAGS) $(WINAPI_CHECK_EXTRA_FLAGS) .
265 # Rules for dependencies
267 $(SUBDIRS:%=%/__depend__): $(MAKEDEP) dummy
268 cd `dirname $@` && $(MAKE) depend
270 depend: $(MAKEDEP) $(SUBDIRS:%=%/__depend__)
271 $(MAKEDEP) $(INCLUDES) -C$(SRCDIR) $(C_SRCS) $(CPP_SRCS) $(C_SRCS16) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) $(IDL_SRCS) $(EXTRA_SRCS)
273 .PHONY: depend $(SUBDIRS:%=%/__depend__)
277 $(SUBDIRS:%=%/__clean__): dummy
278 cd `dirname $@` && $(MAKE) clean
280 $(SUBDIRS:%=%/__testclean__): dummy
281 cd `dirname $@` && $(MAKE) testclean
283 $(EXTRASUBDIRS:%=%/__clean__): dummy
284 -cd `dirname $@` && $(RM) $(CLEAN_FILES)
286 testclean:: $(SUBDIRS:%=%/__testclean__)
288 clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__)
289 $(RM) $(CLEAN_FILES) $(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res) $(MC_SRCS:.mc=.mc.rc) $(PROGRAMS)
291 .PHONY: clean testclean $(SUBDIRS:%=%/__clean__) $(SUBDIRS:%=%/__testclean__) $(EXTRASUBDIRS:%=%/__clean__)
293 # Rules for installing
295 $(SUBDIRS:%=%/__install__): dummy
296 cd `dirname $@` && $(MAKE) install
298 $(SUBDIRS:%=%/__install-lib__): dummy
299 cd `dirname $@` && $(MAKE) install-lib
301 $(SUBDIRS:%=%/__install-dev__): dummy
302 cd `dirname $@` && $(MAKE) install-dev
304 $(SUBDIRS:%=%/__uninstall__): dummy
305 cd `dirname $@` && $(MAKE) uninstall
307 install:: $(INSTALLSUBDIRS:%=%/__install__)
309 uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__)
311 .PHONY: install install-lib install-dev uninstall \
312 $(SUBDIRS:%=%/__install__) $(SUBDIRS:%=%/__uninstall__) \
313 $(SUBDIRS:%=%/__install-lib__) $(SUBDIRS:%=%/__install-dev__)
315 # Rules for checking that no imports are missing
317 $(SUBDIRS:%=%/__checklink__): dummy
318 @cd `dirname $@` && $(MAKE) checklink
320 .PHONY: checklink $(SUBDIRS:%=%/__checklink__)
324 $(SUBDIRS:%=%/__test__): dummy
325 @cd `dirname $@` && $(MAKE) test
327 $(SUBDIRS:%=%/__crosstest__): dummy
328 @cd `dirname $@` && $(MAKE) crosstest
330 .PHONY: check test crosstest $(SUBDIRS:%=%/__test__) $(SUBDIRS:%=%/__crosstest__)
334 $(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res): $(WRC)
336 $(MC_SRCS:.mc=.mc.rc): $(WMC)
338 $(IDL_SRCS:.idl=.h): $(WIDL)
345 .PHONY: dummy $(SUBDIRS)
347 # End of global rules
349 all: $(MODULE)$(DLLEXT) $(BASEMODULE)$(EXEEXT)
351 # Rule for main module spec file
353 $(MODULE).spec.c: $(RC_SRCS:.rc=.res) $(ALL_OBJS) $(WINEBUILD)
354 $(WINEBUILD) $(DEFS) -o $@ --exe $(MODULE) $(APPMODE:%=--exe-mode %) $(RC_SRCS:.rc=.res) $(ALL_OBJS) -L$(DLLDIR) $(DELAYIMPORTS:%=-d%) $(IMPORTS:%=-l%)
356 # Rules for .so main module
358 $(MODULE).so: $(MODULE).spec.o $(ALL_OBJS) Makefile.in
359 $(LDSHARED) $(LDDLLFLAGS) $(MODULE).spec.o $(ALL_OBJS) -o $@ $(ALL_LIBS) -lc
361 $(BASEMODULE): $(WINEWRAPPER)
362 $(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
364 # Rules for .exe main module
366 $(MODULE): $(ALL_OBJS) $(RCOBJS) Makefile.in
367 $(CC) $(ALL_OBJS) $(RCOBJS) -o $@ $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(ALL_LIBS)
371 check test:: $(SUBDIRS:%=%/__test__)
373 $(TESTRESULTS): $(MODULE)$(DLLEXT)
375 # Rules for installation
377 .PHONY: install_prog install_prog.so uninstall_prog uninstall_prog.so
379 install_prog.so: $(MODULE).so dummy
380 $(MKINSTALLDIRS) $(dlldir)
381 $(INSTALL_PROGRAM) $(MODULE).so $(dlldir)/$(MODULE).so
383 install_prog: $(MODULE) dummy
384 $(MKINSTALLDIRS) $(bindir)
385 $(INSTALL_PROGRAM) $(MODULE) $(bindir)/$(MODULE)
387 uninstall_prog.so: dummy
388 $(RM) $(dlldir)/$(MODULE).so
390 uninstall_prog: dummy
391 $(RM) $(bindir)/$(MODULE)
393 install:: install_prog$(DLLEXT)
395 uninstall:: uninstall_prog$(DLLEXT)
398 $(RM) $(BASEMODULE) $(MODULE)