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
19 TOPSRCDIR = @top_srcdir@
28 # Sub-directories to run make depend/clean into
41 # Sub-directories to install for install-lib
51 # Sub-directories to install for install-dev
57 INSTALLSUBDIRS = $(INSTALLDEVSUBDIRS) $(INSTALLLIBSUBDIRS)
59 # Sub-directories to run make test into
68 @echo "Wine build complete."
70 WINAPI_CHECK_EXTRA_FLAGS = --global
74 Make.rules: Make.rules.in configure
75 @echo $? is newer than 'Make.rules', please rerun ./configure!
79 $(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
83 install-aclocal: dummy
84 $(MKINSTALLDIRS) $(datadir)/aclocal
85 $(INSTALL_DATA) $(SRCDIR)/aclocal.m4 $(datadir)/aclocal/wine.m4
87 install-lib:: $(INSTALLLIBSUBDIRS:%=%/__install__)
89 install-dev:: $(INSTALLDEVSUBDIRS:%=%/__install__) install-aclocal
91 install:: install-aclocal
93 @if test -n "`LANG=C $(LDD) $(bindir)/wine|grep not.found`"; \
95 echo "*************************************************" ; \
96 echo "*************************************************" ; \
97 echo "The installed Wine libraries will not be found!" ; \
98 echo "You can either:" ; \
99 echo " Add the line '$(libdir)' to /etc/ld.so.conf" ; \
100 echo ' export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(libdir)' ; \
101 echo "*************************************************" ; \
102 echo "*************************************************" ; \
106 $(RM) $(datadir)/aclocal/wine.m4
107 -rmdir $(datadir)/aclocal
109 .PHONY: install-aclocal install-lib install-dev
111 # Dependencies between directories
114 dlls: library ole tools unicode
115 server: library tools unicode
116 miscemu programs: dlls library ole tools unicode
117 tools: library unicode
119 dlls/__install__: library ole tools unicode
120 server/__install__: library tools unicode
121 miscemu/__install__ programs/__install__: library ole tools unicode dlls/__install__
122 library/__install__: library
124 tools/__install__: tools
125 unicode/__install__: unicode
129 checklink:: $(TESTSUBDIRS:%=%/__checklink__)
130 $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c && $(RM) checklink
132 test_environment: dummy
133 @cd programs/winetest && $(MAKE) test_environment
135 $(TESTSUBDIRS:%=%/__test__): test_environment
137 check test:: $(TESTSUBDIRS:%=%/__test__)
139 crosstest:: $(TESTSUBDIRS:%=%/__crosstest__)
141 .PHONY: test_environment
146 etags `find $(TOPSRCDIR) -name '*.[ch]' -a -not -name '*.spec.c' -a -not -name '*.glue.c' -a -not -name '*.dbg.c' -print`
149 $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/man3w
150 for i in $(SUBDIRS); do (cd $$i && $(MAKE) man); done
153 $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/html
154 for i in $(SUBDIRS); do (cd $$i && $(MAKE) html); done
160 $(RM) config.* TAGS Make.rules dlls/Makedll.rules dlls/Maketest.rules programs/Makeprog.rules include/config.h
161 $(RM) -r autom4te.cache
162 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
164 .PHONY: manpages htmlpages distclean