Moved ts_xlib.c into x11drv and removed libwine_tsx11.
[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         dlls \
44         documentation \
45         library \
46         miscemu \
47         programs \
48         server \
49         unicode
50
51 # Sub-directories to install for install-dev
52 INSTALLDEVSUBDIRS = \
53         include \
54         ole \
55         tools
56
57 INSTALLSUBDIRS = $(INSTALLDEVSUBDIRS) $(INSTALLLIBSUBDIRS)
58
59 # Sub-directories to run make test into
60 TESTSUBDIRS = \
61         dlls \
62         programs
63
64 EMUOBJS = \
65         miscemu/miscemu.o
66
67 all: Make.rules wine
68         @echo "Wine build complete."
69
70 WINAPI_CHECK_EXTRA_FLAGS = --global
71
72 @MAKE_RULES@
73
74 Make.rules: Make.rules.in configure
75         @echo $? is newer than 'Make.rules', please rerun ./configure!
76         @exit 1
77
78 wine: $(WINEWRAPPER)
79         $(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
80
81 # Installation rules
82
83 install-aclocal: dummy
84         $(MKINSTALLDIRS) $(datadir)/aclocal
85         $(INSTALL_DATA) $(SRCDIR)/aclocal.m4 $(datadir)/aclocal/wine.m4
86
87 install-lib:: $(INSTALLLIBSUBDIRS:%=%/__install__)
88
89 install-dev:: $(INSTALLDEVSUBDIRS:%=%/__install__) install-aclocal
90
91 install:: install-aclocal
92         -$(LDCONFIG)
93         @if test -n "`LANG=C $(LDD) $(bindir)/wine|grep not.found`";    \
94         then                                                            \
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 "*************************************************" ; \
103         fi
104
105 uninstall::
106         $(RM) $(datadir)/aclocal/wine.m4
107         -rmdir $(datadir)/aclocal
108
109 .PHONY: install-aclocal install-lib install-dev
110
111 # Dependencies between directories
112
113 all: $(SUBDIRS)
114 dlls: library ole tools unicode
115 server: library tools unicode
116 miscemu programs: dlls library ole tools unicode
117 tools: library unicode
118
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
123 ole/__install__: ole
124 tools/__install__: tools
125 unicode/__install__: unicode
126
127 # Test rules
128
129 checklink:: $(TESTSUBDIRS:%=%/__checklink__)
130         $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c && $(RM) checklink
131
132 test_environment: dummy
133         @cd programs/winetest && $(MAKE) test_environment
134
135 $(TESTSUBDIRS:%=%/__test__): test_environment
136
137 check test:: $(TESTSUBDIRS:%=%/__test__)
138
139 crosstest:: $(TESTSUBDIRS:%=%/__crosstest__)
140
141 .PHONY: test_environment
142
143 # Misc rules
144
145 TAGS etags:
146         etags `find $(TOPSRCDIR) -name '*.[ch]' -a -not -name '*.spec.c' -a -not -name '*.glue.c' -a -not -name '*.dbg.c' -print`
147
148 manpages:
149         $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/man3w
150         for i in $(SUBDIRS); do (cd $$i && $(MAKE) man); done
151
152 htmlpages:
153         $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/html
154         for i in $(SUBDIRS); do (cd $$i && $(MAKE) html); done
155
156 clean::
157         $(RM) wine
158
159 distclean: clean
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`
163
164 .PHONY: manpages htmlpages distclean
165
166 ### Dependencies: