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