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
22 TOPSRCDIR = @top_srcdir@
30 FONTSSUBDIRS = @FONTSSUBDIRS@
32 # Sub-directories to run make depend/clean into
44 # Sub-directories to install for install-lib
51 # Sub-directories to install for install-dev
52 INSTALLDEVSUBDIRS = include
54 # Sub-directories to install for both install-lib and install-dev
55 INSTALLBOTHSUBDIRS = dlls libs tools
57 INSTALLSUBDIRS = $(INSTALLDEVSUBDIRS) $(INSTALLLIBSUBDIRS)
59 # Sub-directories to run make test into
62 all: Make.rules $(PROGRAMS)
63 @echo "Wine build complete."
65 WINAPI_CHECK_EXTRA_FLAGS = --global
67 INSTALLDIRS = $(DESTDIR)$(datadir)/aclocal
71 $(SRCDIR)/configure: @MAINTAINER_MODE@ configure.ac aclocal.m4
72 cd $(SRCDIR) && autoconf --warnings=all
74 $(SRCDIR)/include/config.h.in: @MAINTAINER_MODE@ include/stamp-h.in
75 $(SRCDIR)/include/stamp-h.in: configure.ac aclocal.m4
76 cd $(SRCDIR) && autoheader --warnings=all
79 config.status: configure
80 @./config.status --recheck
82 include/config.h: include/stamp-h
83 include/stamp-h: include/config.h.in config.status
84 @./config.status include/config.h include/stamp-h
87 $(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
91 install install-dev:: $(DESTDIR)$(datadir)/aclocal dummy
92 $(INSTALL_DATA) $(SRCDIR)/aclocal.m4 $(DESTDIR)$(datadir)/aclocal/wine.m4
94 install install-lib:: $(INSTALLLIBSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-lib__)
96 install install-dev:: $(INSTALLDEVSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-dev__)
98 uninstall:: $(INSTALLBOTHSUBDIRS:%=%/__uninstall__)
99 $(RM) $(DESTDIR)$(datadir)/aclocal/wine.m4
100 -rmdir $(DESTDIR)$(datadir)/wine $(DESTDIR)$(datadir)/aclocal
102 # Dependencies between directories
104 all: $(INSTALLSUBDIRS) $(INSTALLBOTHSUBDIRS)
105 dlls: include libs tools
106 fonts loader server: libs tools
107 programs: dlls include libs tools
111 dlls/__install-lib__ dlls/__install-dev__: libs tools include
112 include/__install__: include libs tools
113 libs/__install-lib__ libs/__install-dev__: libs
114 fonts/__install__ loader/__install__ server/__install__: libs tools
115 programs/__install__: libs tools include dlls/__install-lib__
116 tools/__install-lib__ tools/__install-dev__: tools
120 $(SUBDIRS:%=%/__clean__) \
121 $(SUBDIRS:%=%/__depend__) \
122 $(SUBDIRS:%=%/__install-dev__) \
123 $(SUBDIRS:%=%/__install-lib__) \
124 $(SUBDIRS:%=%/__install__) \
125 $(SUBDIRS:%=%/__uninstall__) \
126 $(TESTSUBDIRS:%=%/__crosstest__) \
127 $(TESTSUBDIRS:%=%/__test__) \
128 $(TESTSUBDIRS:%=%/__testclean__)
130 depend $(RECURSE_TARGETS): $(MAKEDEP)
132 $(MAKEDEP): include/config.h
133 @cd $(TOOLSDIR)/tools && $(MAKE) makedep
137 $(TESTSUBDIRS:%=%/__test__): wine
138 $(TESTSUBDIRS:%=%/__crosstest__): tools include
144 (test -d .git && git ls-files '*.[chly]' '*.idl' || find -L $(TOPSRCDIR) -name '*.[ch]' -print) | xargs etags -a
148 (test -d .git && git ls-files '*.[chly]' '*.idl' || find -L $(TOPSRCDIR) -name '*.[ch]' -print) | xargs ctags -a
150 manpages htmlpages sgmlpages: dummy
151 @cd documentation && $(MAKE) $@
154 $(RM) config.* configure.lineno TAGS tags include/config.h include/stamp-h
155 $(RM) -r autom4te.cache
157 .PHONY: manpages htmlpages sgmlpages distclean
161 ALL_MAKERULES = @ALL_MAKERULES@
162 ALL_MAKEFILES = @ALL_MAKEFILES@
164 Makefile $(ALL_MAKERULES) $(ALL_MAKEFILES): config.status
169 $(RECURSE_TARGETS) $(MAKEDEP): $(ALL_MAKEFILES)
172 $(RM) Makefile $(ALL_MAKERULES) $(ALL_MAKEFILES)
174 @ALL_MAKEFILE_DEPENDS@