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 FONTSSUBDIRS = @FONTSSUBDIRS@
31 # Sub-directories to run make depend/clean into
43 # Sub-directories to install for install-lib
50 # Sub-directories to install for install-dev
51 INSTALLDEVSUBDIRS = include
53 # Sub-directories to install for both install-lib and install-dev
54 INSTALLBOTHSUBDIRS = dlls libs tools
56 INSTALLSUBDIRS = $(INSTALLDEVSUBDIRS) $(INSTALLLIBSUBDIRS)
58 # Sub-directories to run make test into
64 @echo "Wine build complete."
66 WINAPI_CHECK_EXTRA_FLAGS = --global
70 Make.rules: Make.rules.in configure
71 @echo $? is newer than 'Make.rules', please rerun ./configure!
75 $(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
79 install-aclocal: dummy
80 $(MKINSTALLDIRS) $(datadir)/aclocal
81 $(INSTALL_DATA) $(SRCDIR)/aclocal.m4 $(datadir)/aclocal/wine.m4
83 install-lib:: $(INSTALLLIBSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-lib__)
85 install-dev:: $(INSTALLDEVSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-dev__) install-aclocal
87 install:: install-lib install-dev install-aclocal
89 @if test -n "`LANG=C $(LDD) $(bindir)/wine|grep not.found`"; \
91 echo "*************************************************" ; \
92 echo "*************************************************" ; \
93 echo "The installed Wine libraries will not be found!" ; \
94 echo "You can either:" ; \
95 echo " Add the line '$(libdir)' to /etc/ld.so.conf and run /sbin/ldconfig" ; \
96 echo ' export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(libdir)' ; \
97 echo "*************************************************" ; \
98 echo "*************************************************" ; \
101 uninstall:: $(INSTALLBOTHSUBDIRS:%=%/__uninstall__)
102 $(RM) $(datadir)/aclocal/wine.m4
103 -rmdir $(datadir)/wine $(datadir)/aclocal
105 .PHONY: install-aclocal
107 # Dependencies between directories
109 all: $(INSTALLSUBDIRS) $(INSTALLBOTHSUBDIRS)
110 dlls: include libs tools
111 fonts loader server: libs tools
112 programs: dlls include libs tools
116 dlls/__install-lib__ dlls/__install-dev__: libs tools include
117 include/__install__: include libs tools
118 libs/__install-lib__ libs/__install-dev__: libs
119 fonts/__install__ loader/__install__ server/__install__: libs tools
120 programs/__install__: libs tools include dlls/__install-lib__
121 tools/__install-lib__ tools/__install-dev__: tools
123 $(SUBDIRS:%=%/__depend__): tools include
127 checklink:: $(TESTSUBDIRS:%=%/__checklink__)
129 check test:: $(TESTSUBDIRS:%=%/__test__)
130 $(TESTSUBDIRS:%=%/__test__): wine
132 crosstest:: $(TESTSUBDIRS:%=%/__crosstest__)
133 $(TESTSUBDIRS:%=%/__crosstest__): tools include
138 find $(TOPSRCDIR) -name '*.[ch]' -a -not -name '*.spec.c' -a -not -name '*.dbg.c' -print | etags -
141 find $(TOPSRCDIR) -name '*.[ch]' -a -not -name '*.spec.c' -a -not -name '*.dbg.c' -print | ctags --c-types=+px -L -
143 manpages htmlpages sgmlpages:
144 cd documentation && $(MAKE) $@
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 sgmlpages distclean