Moved some more 16-bit functions to user16.c.
[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 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__)
85
86 install-dev:: $(INSTALLDEVSUBDIRS:%=%/__install__) install-aclocal
87
88 install:: 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" ; \
97                 echo '   export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(libdir)' ; \
98                 echo "*************************************************" ; \
99                 echo "*************************************************" ; \
100         fi
101
102 uninstall::
103         $(RM) $(datadir)/aclocal/wine.m4
104         -rmdir $(datadir)/aclocal
105
106 .PHONY: install-aclocal install-lib install-dev
107
108 # Dependencies between directories
109
110 all: $(SUBDIRS)
111 dlls: library ole tools unicode
112 server: library tools unicode
113 miscemu programs: dlls library ole tools unicode
114 tools: library unicode
115
116 dlls/__install__: library ole tools unicode
117 server/__install__: library tools unicode
118 miscemu/__install__ programs/__install__: library ole tools unicode dlls/__install__
119 library/__install__: library
120 ole/__install__: ole
121 tools/__install__: tools
122 unicode/__install__: unicode
123
124 # Test rules
125
126 checklink:: $(TESTSUBDIRS:%=%/__checklink__)
127         $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c && $(RM) checklink
128
129 check test:: wine $(TESTSUBDIRS:%=%/__test__)
130
131 crosstest:: $(TESTSUBDIRS:%=%/__crosstest__)
132
133 # Misc rules
134
135 TAGS etags:
136         etags `find $(TOPSRCDIR) -name '*.[ch]' -a -not -name '*.spec.c' -a -not -name '*.glue.c' -a -not -name '*.dbg.c' -print`
137
138 manpages:
139         $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/man3w
140         for i in $(SUBDIRS); do (cd $$i && $(MAKE) man); done
141
142 htmlpages:
143         $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/html
144         for i in $(SUBDIRS); do (cd $$i && $(MAKE) html); done
145
146 clean::
147         $(RM) wine
148
149 distclean: clean
150         $(RM) config.* configure.lineno TAGS Make.rules dlls/Makedll.rules dlls/Maketest.rules programs/Makeprog.rules include/config.h
151         $(RM) -r autom4te.cache
152         $(RM) `find . \( -name Makefile -o -size 0 \) -print`
153
154 .PHONY: manpages htmlpages distclean
155
156 ### Dependencies: