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
10 EXTRALIBS = $(LIBUUID)
19 utility/shellclasses.cpp \
22 utility/dragdropimpl.cpp \
23 utility/shellbrowserimpl.cpp \
24 utility/xmlstorage.cpp \
25 utility/xmlstorage.cpp \
34 shell/shellbrowser.cpp \
39 services/shellservices.cpp \
40 taskbar/desktopbar.cpp \
42 taskbar/startmenu.cpp \
43 taskbar/traynotify.cpp \
44 taskbar/quicklaunch.cpp \
45 taskbar/favorites.cpp \
46 dialogs/searchprogram.cpp \
49 RC_SRCS = explorer_intres.rc
50 EXTRARCFLAGS = -D__WRC__ -D_WIN32
53 # Global rules for building a Winelib program -*-Makefile-*-
55 # Each individual makefile should define the following variables:
56 # MODULE : name of the main module being built
57 # APPMODE : program mode (cui,gui,cuiw,guiw)
58 # EXTRALIBS : extra libraries to link in (optional)
59 # EXTRADEFS : extra symbol definitions, like -DWINELIB (optional)
61 # plus all variables required by the global Make.rules.in
64 DEFS = -D_REENTRANT -fPIC $(EXTRADEFS)
65 LDDLLFLAGS = -Wl,-Bsymbolic,-z,defs
66 ALL_OBJS = $(OBJS) $(MODULE).dbg.o
67 ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBPORT) $(LDFLAGS) $(LIBS)
68 BASEMODULE = $(MODULE:.exe=)
69 TESTIMPORTS = $(DELAYIMPORTS) $(IMPORTS)
70 RUNTESTFLAGS= -q -P wine -T $(TOPOBJDIR) $(PLTESTPROGRAM:%=-p %)
73 # Global rules shared by all makefiles -*-Makefile-*-
75 # Each individual makefile must define the following variables:
76 # TOPSRCDIR : top-level source directory
77 # TOPOBJDIR : top-level object directory
78 # SRCDIR : source directory for this module
79 # MODULE : name of the module being built
81 # Each individual makefile may define the following additional variables:
82 # C_SRCS : C sources for the module
83 # CPP_SRCS : C++ sources for the module
84 # C_SRCS16 : 16-bit C sources for the module
85 # RC_SRCS : resource source files
86 # EXTRA_SRCS : extra source files for make depend
87 # EXTRA_OBJS : extra object files
88 # IMPORTS : dlls to import
89 # DELAYIMPORTS : dlls to import in delayed mode
90 # SUBDIRS : subdirectories that contain a Makefile
91 # EXTRASUBDIRS : subdirectories that do not contain a Makefile
92 # INSTALLSUBDIRS : subdirectories to run make install/uninstall into
94 # First some useful definitions
112 LDSHARED = $(CC) -shared $(SONAME:%=-Wl,-soname,%)
118 WINDRES = mingw32-windres
121 TOOLSDIR = $(TOPOBJDIR)
130 INCLUDES = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL)
131 EXTRACFLAGS = -mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+ -Wpointer-arith
132 ALLCFLAGS = $(INCLUDES) $(DEFS) $(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS)
133 ALLLINTFLAGS = $(INCLUDES) $(DEFS) $(LINTFLAGS)
134 MKINSTALLDIRS= $(TOPSRCDIR)/tools/mkinstalldirs -m 755
135 WINAPI_CHECK = $(TOPSRCDIR)/tools/winapi_check/winapi_check
136 WINEWRAPPER = $(TOPSRCDIR)/tools/winewrapper
137 C2MAN = $(TOPSRCDIR)/tools/c2man.pl
138 RUNTEST = $(TOPSRCDIR)/tools/runtest
139 WINEBUILD = $(TOOLSDIR)/tools/winebuild/winebuild
140 MAKEDEP = $(TOOLSDIR)/tools/makedep
141 WRC = $(TOOLSDIR)/tools/wrc/wrc
142 WMC = $(TOOLSDIR)/tools/wmc/wmc
143 WIDL = $(TOOLSDIR)/tools/widl/widl
146 RCFLAGS = --nostdinc $(INCLUDES) $(EXTRARCFLAGS)
147 RC16FLAGS = -O res16 $(RCFLAGS)
148 LDPATH = LD_LIBRARY_PATH="$(TOOLSDIR)/libs/unicode:$$LD_LIBRARY_PATH"
149 DLLDIR = $(TOPOBJDIR)/dlls
150 LIBDIR = $(TOPOBJDIR)/libs
151 LIBPORT = -L$(TOPOBJDIR)/libs/port -lwine_port
152 LIBUNICODE = -L$(TOPOBJDIR)/libs/unicode -lwine_unicode
153 LIBUUID = -L$(TOPOBJDIR)/libs/uuid -lwine_uuid
154 LIBWINE = -L$(TOPOBJDIR)/libs/wine -lwine
160 INSTALL = /usr/bin/install -c $(INSTALL_FLAGS)
161 INSTALL_PROGRAM = ${INSTALL} $(INSTALL_PROGRAM_FLAGS)
162 INSTALL_SCRIPT = ${INSTALL} $(INSTALL_SCRIPT_FLAGS)
163 INSTALL_DATA = ${INSTALL} -m 644 $(INSTALL_DATA_FLAGS)
165 exec_prefix = ${prefix}
166 bindir = ${exec_prefix}/bin
167 libdir = ${exec_prefix}/lib
168 datadir = ${prefix}/share
169 infodir = ${prefix}/info
170 mandir = ${prefix}/man
171 sysconfdir = ${prefix}/etc
172 includedir = ${prefix}/include/wine
173 dlldir = ${exec_prefix}/lib/wine
177 CLEAN_FILES = *.o *.a *.so *.ln *.$(LIBEXT) \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej \
178 *.flc *.spec.c *.spec.def *.dbg.c y.tab.c y.tab.h lex.yy.c core */*.o
180 OBJS = $(C_SRCS:.c=.o) $(CPP_SRCS:.cpp=.o) $(EXTRA_OBJS)
182 RCOBJS = $(RC_SRCS:.rc=.res.o)
183 LINTS = $(C_SRCS:.c=.ln) $(CPP_SRCS:.cpp=.ln)
187 .SUFFIXES: .mc .rc .mc.rc .res .res.o .coff .spec .spec.c .spec.def .ok
190 $(CC) -c $(ALLCFLAGS) -o $@ $<
193 $(CXX) -c $(ALLCFLAGS) -o $@ $<
199 $(LDPATH) $(WMC) -i -U -H /dev/null -o $@ $<
202 $(LDPATH) $(RC) $(RCFLAGS) -fo$@ $<
205 $(WINDRES) -i $< -o $@
208 $(WINDRES) -i $< -o $@
211 $(WINEBUILD) $(DEFS) -o $@ --main-module $(MODULE) --spec $<
214 $(WINEBUILD) $(DEFS) -o $@ --def $<
217 $(LINT) -c $(ALLLINTFLAGS) $< || ( $(RM) $@ && exit 1 )
220 $(RUNTEST) $(RUNTESTFLAGS) $< && touch $@
222 # 'all' target first in case the enclosing Makefile didn't define any target
227 @$(TOPSRCDIR)/tools/winapi/make_filter --make $(MAKE) all
231 # Rule for main module debug channels
233 $(MODULE).dbg.c: $(C_SRCS) $(CPP_SRCS) $(C_SRCS16) $(WINEBUILD)
234 $(WINEBUILD) $(DEFS) -o $@ --debug -C$(SRCDIR) $(C_SRCS) $(CPP_SRCS) $(C_SRCS16)
236 # Rule to rebuild the tools
239 cd $(TOOLSDIR)/tools && $(MAKE) `basename $@`
243 Makefile: Makefile.in $(TOPSRCDIR)/configure
244 @echo Makefile is older than $?, please rerun $(TOPSRCDIR)/configure
249 $(MODULE).ln : $(LINTS)
250 if test "$(LINTS)" ; \
252 $(LINT) $(ALLLINTFLAGS) -o$(MODULE) $(LINTS) ; \
253 $(MV) llib-l$(MODULE).ln $(MODULE).ln ; \
255 $(LINT) $(ALLLINTFLAGS) -C$(MODULE) /dev/null ; \
260 # Rules for Windows API checking
263 $(WINAPI_CHECK) $(WINAPI_CHECK_FLAGS) $(WINAPI_CHECK_EXTRA_FLAGS) .
267 # Rules for dependencies
269 $(SUBDIRS:%=%/__depend__): $(MAKEDEP) dummy
270 cd `dirname $@` && $(MAKE) depend
272 depend: $(MAKEDEP) $(SUBDIRS:%=%/__depend__)
273 $(MAKEDEP) $(INCLUDES) -C$(SRCDIR) $(C_SRCS) $(CPP_SRCS) $(C_SRCS16) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) $(IDL_SRCS) $(EXTRA_SRCS)
275 .PHONY: depend $(SUBDIRS:%=%/__depend__)
279 $(SUBDIRS:%=%/__clean__): dummy
280 cd `dirname $@` && $(MAKE) clean
282 $(SUBDIRS:%=%/__testclean__): dummy
283 cd `dirname $@` && $(MAKE) testclean
285 $(EXTRASUBDIRS:%=%/__clean__): dummy
286 -cd `dirname $@` && $(RM) $(CLEAN_FILES)
288 testclean:: $(SUBDIRS:%=%/__testclean__)
290 clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__)
291 $(RM) $(CLEAN_FILES) $(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res) $(MC_SRCS:.mc=.mc.rc) $(PROGRAMS)
293 .PHONY: clean testclean $(SUBDIRS:%=%/__clean__) $(SUBDIRS:%=%/__testclean__) $(EXTRASUBDIRS:%=%/__clean__)
295 # Rules for installing
297 $(SUBDIRS:%=%/__install__): dummy
298 cd `dirname $@` && $(MAKE) install
300 $(SUBDIRS:%=%/__install-lib__): dummy
301 cd `dirname $@` && $(MAKE) install-lib
303 $(SUBDIRS:%=%/__install-dev__): dummy
304 cd `dirname $@` && $(MAKE) install-dev
306 $(SUBDIRS:%=%/__uninstall__): dummy
307 cd `dirname $@` && $(MAKE) uninstall
309 install:: $(INSTALLSUBDIRS:%=%/__install__)
311 uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__)
313 .PHONY: install install-lib install-dev uninstall \
314 $(SUBDIRS:%=%/__install__) $(SUBDIRS:%=%/__uninstall__) \
315 $(SUBDIRS:%=%/__install-lib__) $(SUBDIRS:%=%/__install-dev__)
317 # Rules for checking that no imports are missing
319 $(SUBDIRS:%=%/__checklink__): dummy
320 @cd `dirname $@` && $(MAKE) checklink
322 .PHONY: checklink $(SUBDIRS:%=%/__checklink__)
326 $(SUBDIRS:%=%/__test__): dummy
327 @cd `dirname $@` && $(MAKE) test
329 $(SUBDIRS:%=%/__crosstest__): dummy
330 @cd `dirname $@` && $(MAKE) crosstest
332 .PHONY: check test crosstest $(SUBDIRS:%=%/__test__) $(SUBDIRS:%=%/__crosstest__)
336 $(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res): $(WRC)
338 $(MC_SRCS:.mc=.mc.rc): $(WMC)
340 $(IDL_SRCS:.idl=.h): $(WIDL)
347 .PHONY: dummy $(SUBDIRS)
349 # End of global rules
351 all: $(MODULE)$(DLLEXT) $(BASEMODULE)$(EXEEXT)
353 # Rule for main module spec file
355 $(MODULE).spec.c: $(RC_SRCS:.rc=.res) $(ALL_OBJS) $(WINEBUILD)
356 $(WINEBUILD) $(DEFS) -o $@ --exe $(MODULE) $(APPMODE:%=--exe-mode %) $(RC_SRCS:.rc=.res) $(ALL_OBJS) -L$(DLLDIR) $(DELAYIMPORTS:%=-d%) $(IMPORTS:%=-l%)
358 # Rules for .so main module
360 $(MODULE).so: $(MODULE).spec.o $(ALL_OBJS) Makefile.in
361 $(LDSHARED) $(LDDLLFLAGS) $(MODULE).spec.o $(ALL_OBJS) -o $@ $(ALL_LIBS) -lc
363 $(BASEMODULE): $(WINEWRAPPER)
364 $(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
366 # Rules for .exe main module
368 $(MODULE): $(ALL_OBJS) $(RCOBJS) Makefile.in
369 $(CC) $(ALL_OBJS) $(RCOBJS) -o $@ $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(ALL_LIBS)
373 check test:: $(SUBDIRS:%=%/__test__)
375 $(TESTRESULTS): $(MODULE)$(DLLEXT)
377 # Rules for installation
379 .PHONY: install_prog install_prog.so uninstall_prog uninstall_prog.so
381 install_prog.so: $(MODULE).so dummy
382 $(MKINSTALLDIRS) $(dlldir)
383 $(INSTALL_PROGRAM) $(MODULE).so $(dlldir)/$(MODULE).so
385 install_prog: $(MODULE) dummy
386 $(MKINSTALLDIRS) $(bindir)
387 $(INSTALL_PROGRAM) $(MODULE) $(bindir)/$(MODULE)
389 uninstall_prog.so: dummy
390 $(RM) $(dlldir)/$(MODULE).so
392 uninstall_prog: dummy
393 $(RM) $(bindir)/$(MODULE)
395 install:: install_prog$(DLLEXT)
397 uninstall:: uninstall_prog$(DLLEXT)
400 $(RM) $(BASEMODULE) $(MODULE)