Clean Makeimplib.rules too.
[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 # etags:           create a TAGS file for Emacs.
15 # manpages:        compile manpages for Wine API
16 # htmlpages:       compile html pages for Wine API
17 # sgmlpages:       compile sgml source for the Wine API Guide
18
19 # Directories
20
21 TOPSRCDIR = @top_srcdir@
22 TOPOBJDIR = .
23 SRCDIR    = @srcdir@
24 VPATH     = @srcdir@
25 LIBEXT    = @LIBEXT@
26 LDCONFIG  = @LDCONFIG@
27 LDD       = @LDD@
28 MODULE    = none
29
30 FONTSSUBDIRS = @FONTSSUBDIRS@
31
32 # Sub-directories to run make depend/clean into
33 SUBDIRS = \
34         dlls \
35         documentation \
36         fonts \
37         include \
38         libs \
39         loader \
40         programs \
41         server \
42         tools
43
44 # Sub-directories to install for install-lib
45 INSTALLLIBSUBDIRS = \
46         $(FONTSSUBDIRS) \
47         loader \
48         programs \
49         server
50
51 # Sub-directories to install for install-dev
52 INSTALLDEVSUBDIRS = include
53
54 # Sub-directories to install for both install-lib and install-dev
55 INSTALLBOTHSUBDIRS = dlls libs tools
56
57 INSTALLSUBDIRS = $(INSTALLDEVSUBDIRS) $(INSTALLLIBSUBDIRS)
58
59 # Sub-directories to run make test into
60 TESTSUBDIRS = \
61         dlls \
62         programs
63
64 all: Make.rules wine
65         @echo "Wine build complete."
66
67 WINAPI_CHECK_EXTRA_FLAGS = --global
68
69 @MAKE_RULES@
70
71 Make.rules: Make.rules.in configure
72         @echo $? is newer than 'Make.rules', please rerun ./configure!
73         @exit 1
74
75 wine: $(WINEWRAPPER)
76         $(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
77
78 # Installation rules
79
80 install-aclocal: dummy
81         $(MKINSTALLDIRS) $(datadir)/aclocal
82         $(INSTALL_DATA) $(SRCDIR)/aclocal.m4 $(datadir)/aclocal/wine.m4
83
84 install-lib:: $(INSTALLLIBSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-lib__)
85
86 install-dev:: $(INSTALLDEVSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-dev__) install-aclocal
87
88 install:: install-lib install-dev install-aclocal
89         -$(LDCONFIG)
90         @if test -n "`LANG=C $(LDD) $(bindir)/wine|grep not.found`";    \
91         then                                                            \
92                 echo "*************************************************" ; \
93                 echo "*************************************************" ; \
94                 echo "The installed Wine libraries will not be found!" ; \
95                 echo "You can either:" ;                                \
96                 echo "   Add the line '$(libdir)' to /etc/ld.so.conf and run /sbin/ldconfig" ;  \
97                 echo '   export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(libdir)' ; \
98                 echo "*************************************************" ; \
99                 echo "*************************************************" ; \
100         fi
101
102 uninstall:: $(INSTALLBOTHSUBDIRS:%=%/__uninstall__)
103         $(RM) $(datadir)/aclocal/wine.m4
104         -rmdir $(datadir)/wine $(datadir)/aclocal
105
106 .PHONY: install-aclocal
107
108 # Dependencies between directories
109
110 all: $(INSTALLSUBDIRS) $(INSTALLBOTHSUBDIRS)
111 dlls: include libs tools
112 fonts loader server: libs tools
113 programs: dlls include libs tools
114 include: libs tools
115 tools: libs
116
117 dlls/__install-lib__ dlls/__install-dev__: libs tools include
118 include/__install__: include libs tools
119 libs/__install-lib__ libs/__install-dev__: libs
120 fonts/__install__ loader/__install__ server/__install__: libs tools
121 programs/__install__: libs tools include dlls/__install-lib__
122 tools/__install-lib__ tools/__install-dev__: tools
123
124 $(SUBDIRS:%=%/__depend__): tools include
125
126 # Test rules
127
128 checklink:: $(TESTSUBDIRS:%=%/__checklink__)
129
130 check test:: $(TESTSUBDIRS:%=%/__test__)
131 $(TESTSUBDIRS:%=%/__test__): wine
132
133 crosstest:: $(TESTSUBDIRS:%=%/__crosstest__)
134 $(TESTSUBDIRS:%=%/__crosstest__): tools include
135
136 # Misc rules
137
138 TAGS etags:
139         find $(TOPSRCDIR) -name '*.[ch]' -a -not -name '*.spec.c' -a -not -name '*.dbg.c' -print | etags -
140
141 tags ctags:
142         find $(TOPSRCDIR) -name '*.[ch]' -a -not -name '*.spec.c' -a -not -name '*.dbg.c' -print | ctags --c-types=+px -L -
143
144 manpages htmlpages sgmlpages:
145         cd documentation && $(MAKE) $@
146
147 clean::
148         $(RM) wine
149
150 distclean: clean
151         $(RM) config.* configure.lineno TAGS tags Make.rules dlls/Makedll.rules dlls/Makeimplib.rules dlls/Maketest.rules programs/Makeprog.rules libs/Makelib.rules include/config.h
152         $(RM) -r autom4te.cache
153         $(RM) `find . \( -name Makefile -o -size 0 \) -print`
154
155 .PHONY: manpages htmlpages sgmlpages distclean
156
157 ### Dependencies: