makefiles: Output all the program rules explicitly for each module.
[wine] / Makefile.in
1 # This Makefile understands the following targets:
2 #
3 # all (default):   build wine
4 # clean:           remove all intermediate files
5 # distclean:       also remove all files created by configure
6 # test:            run tests
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
20
21 # Directories
22
23 TOPSRCDIR = @top_srcdir@
24 TOPOBJDIR = .
25 SRCDIR    = @srcdir@
26 VPATH     = @srcdir@
27 LIBEXT    = @LIBEXT@
28 MODULE    = none
29
30 ALL_DIRS           = @ALL_DIRS@
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@
35
36 # Sub-directories to run make all into
37 BUILDSUBDIRS = \
38         libs/wine \
39         $(ALL_TOOL_DIRS) \
40         $(ALL_TOP_DIRS) \
41         $(ALL_STATICLIB_DIRS) \
42         $(ALL_DLL_DIRS)
43
44 # Sub-directories to run make install/uninstall into
45 INSTALLSUBDIRS = \
46         libs/wine \
47         $(ALL_TOOL_DIRS) \
48         $(ALL_TOP_DIRS) \
49         $(ALL_STATICLIB_DIRS) \
50         $(ALL_DLL_DIRS)
51
52 # Sub-directories that don't have a makefile
53 EXTRASUBDIRS = dlls libs
54
55 all: wine
56         @echo "Wine build complete."
57
58 WINAPI_CHECK_EXTRA_FLAGS = --global
59
60 @MAKE_RULES@
61
62 # Rules for re-running configure
63
64 ALL_CONFIGS = Makefile @ALL_MAKERULES@ @ALL_SYMLINKS@
65
66 $(SRCDIR)/configure: @MAINTAINER_MODE@ configure.ac aclocal.m4
67         cd $(SRCDIR) && autoconf --warnings=all
68
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
72         @echo timestamp > $@
73
74 config.status: configure
75         @./config.status --recheck
76
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
80
81 $(ALL_CONFIGS):
82         @./config.status $@
83
84 # Rules for building
85
86 all: $(BUILDSUBDIRS)
87
88 $(ALL_DIRS): dummy
89         @cd $@ && $(MAKE)
90
91 .PHONY: $(ALL_DIRS)
92
93 # Rules for dependencies
94
95 depend: $(ALL_DIRS:%=%/__depend__) dummy
96 .PHONY: $(ALL_DIRS:%=%/__depend__)
97
98 # Rules for cleaning
99
100 $(ALL_DIRS:%=%/__clean__): dummy
101         @cd `dirname $@` && $(MAKE) clean
102
103 clean:: $(ALL_DIRS:%=%/__clean__)
104         $(RM) $(ALL_DIRS:%=%/Makefile) tools/makedep$(EXEEXT)
105
106 distclean:: clean
107         $(RM) config.* configure.lineno TAGS tags include/config.h include/stamp-h $(ALL_CONFIGS)
108         $(RM) -r autom4te.cache
109
110 .PHONY: distclean $(ALL_DIRS:%=%/__clean__)
111
112 # Rules for installing
113
114 $(INSTALLSUBDIRS:%=%/__install__): dummy
115         @cd `dirname $@` && $(MAKE) install
116
117 $(INSTALLSUBDIRS:%=%/__install-lib__): dummy
118         @cd `dirname $@` && $(MAKE) install-lib
119
120 $(INSTALLSUBDIRS:%=%/__install-dev__): dummy
121         @cd `dirname $@` && $(MAKE) install-dev
122
123 $(INSTALLSUBDIRS:%=%/__uninstall__): dummy
124         @cd `dirname $@` && $(MAKE) uninstall
125
126 install:: $(INSTALLSUBDIRS:%=%/__install__) dummy
127 install-lib:: $(INSTALLSUBDIRS:%=%/__install-lib__) dummy
128 install-dev:: $(INSTALLSUBDIRS:%=%/__install-dev__) dummy
129 uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__) dummy
130
131 .PHONY: $(INSTALLSUBDIRS:%=%/__install__) $(INSTALLSUBDIRS:%=%/__uninstall__) \
132         $(INSTALLSUBDIRS:%=%/__install-lib__) $(INSTALLSUBDIRS:%=%/__install-dev__)
133
134 # Rules for auto documentation
135
136 DOCSUBDIRS = $(ALL_DLL_DIRS)
137
138 $(DOCSUBDIRS:%=%/__man__): dummy
139         @cd `dirname $@` && $(MAKE) man
140
141 $(DOCSUBDIRS:%=%/__doc_html__): dummy
142         @cd `dirname $@` && $(MAKE) doc-html
143
144 $(DOCSUBDIRS:%=%/__doc_sgml__): dummy
145         @cd `dirname $@` && $(MAKE) doc-sgml
146
147 $(DOCSUBDIRS:%=%/__doc_xml__): dummy
148         @cd `dirname $@` && $(MAKE) doc-xml
149
150 man: $(DOCSUBDIRS:%=%/__man__)
151 doc-html: $(DOCSUBDIRS:%=%/__doc_html__)
152 doc-sgml: $(DOCSUBDIRS:%=%/__doc_sgml__)
153 doc-xml: $(DOCSUBDIRS:%=%/__doc_xml__)
154
155 manpages htmlpages sgmlpages xmlpages: dummy
156         @cd documentation && $(MAKE) $@
157
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__)
160
161 # Dependencies between directories
162
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__
167
168 loader server: libs/port libs/wine tools
169 fonts: tools
170 include: tools/widl
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
175
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)
189
190 $(MAKEDEP): include/config.h tools/Makefile
191         @cd $(TOOLSDIR)/tools && $(MAKE) makedep$(TOOLSEXT)
192
193 # Misc rules
194
195 TAGS etags:
196         $(RM) TAGS
197         (test -d .git && git ls-files '*.[chly]' '*.idl' || find -L $(TOPSRCDIR) -name '*.[ch]' -print) | xargs etags -a
198
199 tags ctags:
200         $(RM) tags
201         (test -d .git && git ls-files '*.[chly]' '*.idl' || find -L $(TOPSRCDIR) -name '*.[ch]' -print) | xargs ctags -a
202
203 # Makefile rules
204
205 .INIT: Makefile
206 .BEGIN: Makefile
207 .MAKEFILEDEPS:
208
209 @ALL_MAKEFILE_DEPENDS@
210
211 uninstall::
212         -rmdir $(DESTDIR)$(datadir)/wine $(DESTDIR)$(fakedlldir) $(DESTDIR)$(dlldir)