1 # This Makefile understands the following targets:
3 # all (default): build wine
4 # clean: remove all intermediate files
5 # distclean: also remove all files created by configure
7 # testclean: clean test results to force running all tests again
8 # crosstest: build tests as native windows applications (requires MinGW)
9 # install-lib: install libraries needed to run applications
10 # install-dev: install development environment
11 # install: install everything
12 # uninstall: uninstall everything
13 # depend: create the dependencies
14 # ctags: create a tags file for vim and others.
15 # etags: create a TAGS file for Emacs.
16 # manpages: compile manpages for Wine API
17 # htmlpages: compile html pages for Wine API
18 # sgmlpages: compile sgml source for the Wine API Guide
19 # xmlpages: compile xml source for the Wine API Guide
23 TOPSRCDIR = @top_srcdir@
31 ALL_DLL_DIRS = @ALL_DLL_DIRS@
32 ALL_STATICLIB_DIRS = @ALL_STATICLIB_DIRS@
33 ALL_TOOL_DIRS = @ALL_TOOL_DIRS@
34 ALL_TOP_DIRS = @ALL_TOP_DIRS@
36 # Sub-directories to run make all into
41 $(ALL_STATICLIB_DIRS) \
44 # Sub-directories to run make install/uninstall into
49 $(ALL_STATICLIB_DIRS) \
52 # Sub-directories that don't have a makefile
53 EXTRASUBDIRS = dlls libs
56 @echo "Wine build complete."
58 WINAPI_CHECK_EXTRA_FLAGS = --global
62 # Rules for re-running configure
64 ALL_CONFIGS = Makefile @ALL_MAKERULES@ @ALL_SYMLINKS@
66 $(SRCDIR)/configure: @MAINTAINER_MODE@ configure.ac aclocal.m4
67 cd $(SRCDIR) && autoconf --warnings=all
69 $(SRCDIR)/include/config.h.in: @MAINTAINER_MODE@ include/stamp-h.in
70 $(SRCDIR)/include/stamp-h.in: configure.ac aclocal.m4
71 cd $(SRCDIR) && autoheader --warnings=all
74 config.status: configure
75 @./config.status --recheck
77 include/config.h: include/stamp-h
78 include/stamp-h: include/config.h.in config.status
79 @./config.status include/config.h include/stamp-h
93 # Rules for dependencies
95 depend: $(ALL_DIRS:%=%/__depend__) dummy
96 .PHONY: $(ALL_DIRS:%=%/__depend__)
100 $(ALL_DIRS:%=%/__clean__): dummy
101 @cd `dirname $@` && $(MAKE) clean
103 clean:: $(ALL_DIRS:%=%/__clean__)
104 $(RM) $(ALL_DIRS:%=%/Makefile) tools/makedep$(EXEEXT)
107 $(RM) config.* configure.lineno TAGS tags include/config.h include/stamp-h $(ALL_CONFIGS)
108 $(RM) -r autom4te.cache
110 .PHONY: distclean $(ALL_DIRS:%=%/__clean__)
112 # Rules for installing
114 $(INSTALLSUBDIRS:%=%/__install__): dummy
115 @cd `dirname $@` && $(MAKE) install
117 $(INSTALLSUBDIRS:%=%/__install-lib__): dummy
118 @cd `dirname $@` && $(MAKE) install-lib
120 $(INSTALLSUBDIRS:%=%/__install-dev__): dummy
121 @cd `dirname $@` && $(MAKE) install-dev
123 $(INSTALLSUBDIRS:%=%/__uninstall__): dummy
124 @cd `dirname $@` && $(MAKE) uninstall
126 install:: $(INSTALLSUBDIRS:%=%/__install__) dummy
127 install-lib:: $(INSTALLSUBDIRS:%=%/__install-lib__) dummy
128 install-dev:: $(INSTALLSUBDIRS:%=%/__install-dev__) dummy
129 uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__) dummy
131 .PHONY: $(INSTALLSUBDIRS:%=%/__install__) $(INSTALLSUBDIRS:%=%/__uninstall__) \
132 $(INSTALLSUBDIRS:%=%/__install-lib__) $(INSTALLSUBDIRS:%=%/__install-dev__)
134 # Rules for auto documentation
136 DOCSUBDIRS = $(ALL_DLL_DIRS)
138 $(DOCSUBDIRS:%=%/__man__): dummy
139 @cd `dirname $@` && $(MAKE) man
141 $(DOCSUBDIRS:%=%/__doc_html__): dummy
142 @cd `dirname $@` && $(MAKE) doc-html
144 $(DOCSUBDIRS:%=%/__doc_sgml__): dummy
145 @cd `dirname $@` && $(MAKE) doc-sgml
147 $(DOCSUBDIRS:%=%/__doc_xml__): dummy
148 @cd `dirname $@` && $(MAKE) doc-xml
150 man: $(DOCSUBDIRS:%=%/__man__)
151 doc-html: $(DOCSUBDIRS:%=%/__doc_html__)
152 doc-sgml: $(DOCSUBDIRS:%=%/__doc_sgml__)
153 doc-xml: $(DOCSUBDIRS:%=%/__doc_xml__)
155 manpages htmlpages sgmlpages xmlpages: dummy
156 @cd documentation && $(MAKE) $@
158 .PHONY: man doc-html doc-sgml doc-xml manpages htmlpages sgmlpages xmlpages \
159 $(DOCSUBDIRS:%=%/__man__) $(DOCSUBDIRS:%=%/__doc_html__) $(DOCSUBDIRS:%=%/__doc_sgml__) $(DOCSUBDIRS:%=%/__doc_xml__)
161 # Dependencies between directories
163 # dependencies needed to build any dll or program
164 __tooldeps__: libs/port libs/wine libs/wpp $(ALL_TOOL_DIRS)
165 __builddeps__ __buildcrossdeps__: __tooldeps__ include
166 .PHONY: __tooldeps__ __builddeps__ __buildcrossdeps__
168 loader server: libs/port libs/wine tools
171 libs/wine $(ALL_TOOL_DIRS): libs/port
172 tools/wmc tools/wrc: tools
173 tools tools/wmc tools/wrc: libs/wine
174 tools/widl tools/wmc tools/wrc: libs/wpp
176 fonts/__install__ fonts/__install-lib__: tools
177 include/__install__ include/__install-dev__: include
178 libs/wine/__install__ libs/wine/__install-lib__ libs/wine/__install-dev__: libs/wine
179 loader/__install__ loader/__install-lib__: libs/port libs/wine tools
180 server/__install__ server/__install-lib__: libs/port libs/wine tools
181 tools/__install__ tools/__install-lib__ tools/__install-dev__: tools
182 tools/widl/__install__ tools/widl/__install-dev__: tools/widl
183 tools/winebuild/__install__ tools/winebuild/__install-dev__: tools/winebuild
184 tools/winedump/__install__ tools/winedump/__install-dev__: tools/winedump
185 tools/winegcc/__install__ tools/winegcc/__install-dev__: tools/winegcc
186 tools/wmc/__install__ tools/wmc/__install-dev__: tools/wmc
187 tools/wrc/__install__ tools/wrc/__install-dev__: tools/wrc
188 tools/__depend__: $(MAKEDEP)
190 $(MAKEDEP): include/config.h tools/Makefile
191 @cd $(TOOLSDIR)/tools && $(MAKE) makedep$(TOOLSEXT)
197 (test -d .git && git ls-files '*.[chly]' '*.idl' || find -L $(TOPSRCDIR) -name '*.[ch]' -print) | xargs etags -a
201 (test -d .git && git ls-files '*.[chly]' '*.idl' || find -L $(TOPSRCDIR) -name '*.[ch]' -print) | xargs ctags -a
209 @ALL_MAKEFILE_DEPENDS@
212 -rmdir $(DESTDIR)$(datadir)/wine $(DESTDIR)$(fakedlldir) $(DESTDIR)$(dlldir)