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_TOOL_DIRS = @ALL_TOOL_DIRS@
33 ALL_TOP_DIRS = @ALL_TOP_DIRS@
35 # Sub-directories to run make all into
41 # Sub-directories to run make install/uninstall into
47 # Sub-directories that don't have a makefile
48 EXTRASUBDIRS = dlls libs
51 @echo "Wine build complete."
53 WINAPI_CHECK_EXTRA_FLAGS = --global
57 # Rules for re-running configure
59 ALL_CONFIGS = Makefile @ALL_MAKERULES@ @ALL_SYMLINKS@
61 $(SRCDIR)/configure: @MAINTAINER_MODE@ configure.ac aclocal.m4
62 cd $(SRCDIR) && autoconf --warnings=all
64 $(SRCDIR)/include/config.h.in: @MAINTAINER_MODE@ include/stamp-h.in
65 $(SRCDIR)/include/stamp-h.in: configure.ac aclocal.m4
66 cd $(SRCDIR) && autoheader --warnings=all
69 config.status: configure
70 @./config.status --recheck
72 include/config.h: include/stamp-h
73 include/stamp-h: include/config.h.in config.status
74 @./config.status include/config.h include/stamp-h
88 # Rules for dependencies
90 depend: $(ALL_DIRS:%=%/__depend__) dummy
91 .PHONY: $(ALL_DIRS:%=%/__depend__)
95 $(ALL_DIRS:%=%/__clean__): dummy
96 @cd `dirname $@` && $(MAKE) clean
98 clean:: $(ALL_DIRS:%=%/__clean__)
99 $(RM) $(ALL_DIRS:%=%/Makefile) tools/makedep$(EXEEXT)
102 $(RM) config.* configure.lineno TAGS tags include/config.h include/stamp-h $(ALL_CONFIGS)
103 $(RM) -r autom4te.cache
105 .PHONY: distclean $(ALL_DIRS:%=%/__clean__)
107 # Rules for installing
109 $(INSTALLSUBDIRS:%=%/__install__): dummy
110 @cd `dirname $@` && $(MAKE) install
112 $(INSTALLSUBDIRS:%=%/__install-lib__): dummy
113 @cd `dirname $@` && $(MAKE) install-lib
115 $(INSTALLSUBDIRS:%=%/__install-dev__): dummy
116 @cd `dirname $@` && $(MAKE) install-dev
118 $(INSTALLSUBDIRS:%=%/__uninstall__): dummy
119 @cd `dirname $@` && $(MAKE) uninstall
121 install:: $(INSTALLSUBDIRS:%=%/__install__) dummy
122 install-lib:: $(INSTALLSUBDIRS:%=%/__install-lib__) dummy
123 install-dev:: $(INSTALLSUBDIRS:%=%/__install-dev__) dummy
124 uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__) dummy
126 .PHONY: $(INSTALLSUBDIRS:%=%/__install__) $(INSTALLSUBDIRS:%=%/__uninstall__) \
127 $(INSTALLSUBDIRS:%=%/__install-lib__) $(INSTALLSUBDIRS:%=%/__install-dev__)
129 # Rules for auto documentation
131 DOCSUBDIRS = $(ALL_DLL_DIRS)
133 $(DOCSUBDIRS:%=%/__man__): dummy
134 @cd `dirname $@` && $(MAKE) man
136 $(DOCSUBDIRS:%=%/__doc_html__): dummy
137 @cd `dirname $@` && $(MAKE) doc-html
139 $(DOCSUBDIRS:%=%/__doc_sgml__): dummy
140 @cd `dirname $@` && $(MAKE) doc-sgml
142 $(DOCSUBDIRS:%=%/__doc_xml__): dummy
143 @cd `dirname $@` && $(MAKE) doc-xml
145 man: $(DOCSUBDIRS:%=%/__man__)
146 doc-html: $(DOCSUBDIRS:%=%/__doc_html__)
147 doc-sgml: $(DOCSUBDIRS:%=%/__doc_sgml__)
148 doc-xml: $(DOCSUBDIRS:%=%/__doc_xml__)
150 manpages htmlpages sgmlpages xmlpages: dummy
151 @cd documentation && $(MAKE) $@
153 .PHONY: man doc-html doc-sgml doc-xml manpages htmlpages sgmlpages xmlpages \
154 $(DOCSUBDIRS:%=%/__man__) $(DOCSUBDIRS:%=%/__doc_html__) $(DOCSUBDIRS:%=%/__doc_sgml__) $(DOCSUBDIRS:%=%/__doc_xml__)
156 # Dependencies between directories
158 # dependencies needed to build any dll or program
159 __tooldeps__: libs/port libs/wine libs/wpp $(ALL_TOOL_DIRS)
160 __builddeps__ __buildcrossdeps__: __tooldeps__ include
161 .PHONY: __tooldeps__ __builddeps__ __buildcrossdeps__
163 loader server: libs/port libs/wine tools
166 libs/wine $(ALL_TOOL_DIRS): libs/port
167 tools/wmc tools/wrc: tools
168 tools tools/wmc tools/wrc: libs/wine
169 tools/widl tools/wmc tools/wrc: libs/wpp
171 fonts/__install__ fonts/__install-lib__: tools
172 include/__install__ include/__install-dev__: include
173 libs/wine/__install__ libs/wine/__install-lib__ libs/wine/__install-dev__: libs/wine
174 loader/__install__ loader/__install-lib__: libs/port libs/wine tools
175 server/__install__ server/__install-lib__: libs/port libs/wine tools
176 tools/__install__ tools/__install-lib__ tools/__install-dev__: tools
177 tools/widl/__install__ tools/widl/__install-dev__: tools/widl
178 tools/winebuild/__install__ tools/winebuild/__install-dev__: tools/winebuild
179 tools/winedump/__install__ tools/winedump/__install-dev__: tools/winedump
180 tools/winegcc/__install__ tools/winegcc/__install-dev__: tools/winegcc
181 tools/wmc/__install__ tools/wmc/__install-dev__: tools/wmc
182 tools/wrc/__install__ tools/wrc/__install-dev__: tools/wrc
183 tools/__depend__: $(MAKEDEP)
185 $(MAKEDEP): include/config.h tools/Makefile
186 @cd $(TOOLSDIR)/tools && $(MAKE) makedep$(TOOLSEXT)
192 (test -d .git && git ls-files '*.[chly]' '*.idl' || find -L $(TOPSRCDIR) -name '*.[ch]' -print) | xargs etags -a
196 (test -d .git && git ls-files '*.[chly]' '*.idl' || find -L $(TOPSRCDIR) -name '*.[ch]' -print) | xargs ctags -a
204 @ALL_MAKEFILE_DEPENDS@
207 -rmdir $(DESTDIR)$(datadir)/wine $(DESTDIR)$(fakedlldir) $(DESTDIR)$(dlldir)