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 # install-lib: install libraries needed to run applications
9 # install-dev: install development environment
10 # install: install everything
11 # uninstall: uninstall everything
12 # depend: create the dependencies
13 # etags: create a TAGS file for Emacs.
14 # manpages: compile manpages for Wine API
15 # htmlpages: compile html pages for Wine API
16 # sgmlpages: compile sgml source for the Wine API Guide
20 TOPSRCDIR = @top_srcdir@
29 # Sub-directories to run make depend/clean into
40 # Sub-directories to install for install-lib
47 # Sub-directories to install for install-dev
48 INSTALLDEVSUBDIRS = include tools
50 # Sub-directories to install for both install-lib and install-dev
51 INSTALLBOTHSUBDIRS = dlls libs
53 INSTALLSUBDIRS = $(INSTALLDEVSUBDIRS) $(INSTALLLIBSUBDIRS)
55 # Sub-directories to run make test into
61 @echo "Wine build complete."
63 WINAPI_CHECK_EXTRA_FLAGS = --global
67 Make.rules: Make.rules.in configure
68 @echo $? is newer than 'Make.rules', please rerun ./configure!
72 $(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
76 install-aclocal: dummy
77 $(MKINSTALLDIRS) $(datadir)/aclocal
78 $(INSTALL_DATA) $(SRCDIR)/aclocal.m4 $(datadir)/aclocal/wine.m4
80 install-lib:: $(INSTALLLIBSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-lib__)
82 install-dev:: $(INSTALLDEVSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-dev__) install-aclocal
84 install:: install-lib install-dev install-aclocal
86 @if test -n "`LANG=C $(LDD) $(bindir)/wine|grep not.found`"; \
88 echo "*************************************************" ; \
89 echo "*************************************************" ; \
90 echo "The installed Wine libraries will not be found!" ; \
91 echo "You can either:" ; \
92 echo " Add the line '$(libdir)' to /etc/ld.so.conf and run /sbin/ldconfig" ; \
93 echo ' export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(libdir)' ; \
94 echo "*************************************************" ; \
95 echo "*************************************************" ; \
98 uninstall:: $(INSTALLBOTHSUBDIRS:%=%/__uninstall__)
99 $(RM) $(datadir)/aclocal/wine.m4
100 -rmdir $(datadir)/aclocal
102 .PHONY: install-aclocal
104 # Dependencies between directories
109 miscemu programs: dlls libs tools
112 dlls/__install-lib__ dlls/__install-dev__: libs tools
113 libs/__install-lib__ libs/__install-dev__: libs
114 server/__install__: libs tools
115 miscemu/__install__ programs/__install__: libs tools dlls/__install-lib__
116 tools/__install__: tools
120 checklink:: $(TESTSUBDIRS:%=%/__checklink__)
122 check test:: wine $(TESTSUBDIRS:%=%/__test__)
124 crosstest:: $(TESTSUBDIRS:%=%/__crosstest__)
129 etags `find $(TOPSRCDIR) -name '*.[ch]' -a -not -name '*.spec.c' -a -not -name '*.glue.c' -a -not -name '*.dbg.c' -print`
132 ctags --c-types=+px `find $(TOPSRCDIR) -name '*.[ch]' -a -not -name '*.spec.c' -a -not -name '*.glue.c' -a -not -name '*.dbg.c' -print`
135 $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/man3w
136 cd dlls && $(MAKE) man
139 $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/html
140 cd dlls && $(MAKE) doc-html
143 $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/api-guide
144 cd dlls && $(MAKE) doc-sgml
150 $(RM) config.* configure.lineno TAGS tags Make.rules dlls/Makedll.rules dlls/Maketest.rules programs/Makeprog.rules libs/Makelib.rules include/config.h
151 $(RM) -r autom4te.cache
152 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
154 .PHONY: manpages htmlpages distclean