Fixed typo.
[wine] / Makefile.in
1 # This Makefile understands the following targets:
2 #
3 # all (default):        build wine
4 # lib:                  build libwine
5 # clean:                remove all intermediate files
6 # distclean:            also remove all files created by configure
7 # install:              install everything
8 # uninstall:            uninstall everything
9 # depend:               create the dependencies
10 # etags:                create a TAGS file for Emacs.
11 # manpages:             compile manpages for Wine API
12 #
13
14 # Main target to build
15
16 MAIN_TARGET = @MAIN_TARGET@
17
18 # Directories
19
20 TOPSRCDIR = @top_srcdir@
21 TOPOBJDIR = .
22 SRCDIR    = @srcdir@
23 VPATH     = @srcdir@
24 MODULE    = none
25
26 LIBSUBDIRS = \
27         tools \
28         tools/wrc \
29         controls \
30         console \
31         dlls/advapi32 \
32         dlls/comctl32 \
33         dlls/imagehlp \
34         dlls/msacm \
35         dlls/msacm32 \
36         dlls/ntdll \
37         dlls/psapi \
38         dlls/rasapi32 \
39         dlls/shell32 \
40         dlls/winaspi \
41         dlls/wnaspi32 \
42         files \
43         graphics \
44         graphics/metafiledrv \
45         graphics/psdrv \
46         ipc \
47         library \
48         loader \
49         loader/ne \
50         loader/dos \
51         memory \
52         misc \
53         msdos \
54         multimedia \
55         objects \
56         ole \
57         relay32 \
58         resources \
59         scheduler \
60         server \
61         win32 \
62         windows \
63         windows/ttydrv
64
65 X11SUBDIRS = \
66         graphics/x11drv \
67         tsx11 \
68         windows/x11drv
69
70 EMUSUBDIRS = \
71         debugger \
72         graphics/win16drv \
73         if1632 \
74         miscemu
75
76 PROGSUBDIRS = libtest programs
77
78 DOCSUBDIRS = documentation
79
80 # All sub-directories
81 ALLSUBDIRS = \
82         $(LIBSUBDIRS) \
83         $(X11SUBDIRS) \
84         $(EMUSUBDIRS) \
85         $(PROGSUBDIRS) \
86         $(DOCSUBDIRS)
87
88 # Sub-directories to run make depend into
89 DEPENDSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
90
91 # Sub-directories to run make install into
92 INSTALLSUBDIRS = $(DOCSUBDIRS)
93
94 LIBOBJS = \
95         controls/controls.o \
96         console/console.o \
97         dlls/advapi32/advapi32.o \
98         dlls/comctl32/comctl32.o \
99         dlls/imagehlp/imagehlp.o \
100         dlls/msacm/msacm.o \
101         dlls/msacm32/msacm32.o \
102         dlls/ntdll/ntdll.o \
103         dlls/psapi/psapi.o \
104         dlls/rasapi32/rasapi32.o \
105         dlls/shell32/shell32.o \
106         dlls/winaspi/winaspi.o \
107         dlls/wnaspi32/wnaspi32.o \
108         files/files.o \
109         graphics/graphics.o \
110         graphics/metafiledrv/metafiledrv.o \
111         graphics/psdrv/psdrv.o \
112         ipc/ipc.o \
113         loader/loader.o \
114         loader/ne/ne.o \
115         loader/dos/dos.o \
116         memory/memory.o \
117         misc/misc.o \
118         msdos/msdos.o \
119         multimedia/multimedia.o \
120         objects/objects.o \
121         ole/ole.o \
122         relay32/relay32.o \
123         resources/resources.o \
124         scheduler/scheduler.o \
125         server/server.o \
126         win32/win32.o \
127         windows/windows.o \
128         windows/ttydrv/ttydrv.o
129
130 X11OBJS = \
131         graphics/x11drv/x11drv.o \
132         tsx11/tsx11.o \
133         windows/x11drv/x11drv.o
134
135 EMUOBJS = \
136         debugger/debugger.o \
137         graphics/win16drv/win16drv.o \
138         if1632/if1632.o \
139         miscemu/miscemu.o
140
141 LIB_TARGET  = @LIB_TARGET@
142
143 ALT_LINK    = @ALT_LINK@
144
145 all: Makefile Make.rules $(MAIN_TARGET)
146
147 @MAKE_RULES@
148
149 Make.rules: Make.rules.in configure
150         @echo $? is newer than 'Make.rules', please rerun ./configure!
151         @exit 1
152
153 install:: install_$(MAIN_TARGET)
154
155 uninstall:: uninstall_$(MAIN_TARGET)
156
157 emu: wine
158
159 lib: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET)
160
161 wine wine.sym: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET) $(EMUSUBDIRS) dummy
162         $(CC) -o wine $(EMUOBJS) $(ALT_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
163         nm -n wine | grep -v _compiled >wine.sym
164         @echo "Wine build complete."
165
166 libwine.a: $(LIBOBJS) $(X11OBJS)
167         $(RM) $@
168         $(AR) $@ $(LIBOBJS) $(X11OBJS)
169         $(RANLIB) $@
170
171 libwine.so.1.0: $(LIBOBJS) $(X11OBJS)
172         $(LDSHARED) -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS)
173         ln -sf $@ libwine.so
174
175 install_emu: install_lib
176         [ -d $(bindir) ] || $(MKDIR) $(bindir)
177         $(INSTALL_PROGRAM) wine $(bindir)/wine
178         $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
179
180 uninstall_emu: uninstall_lib
181         $(RM) $(bindir)/wine $(bindir)/dosmod
182
183 install_lib: install_includes
184         [ -d $(libdir) ] || $(MKDIR) $(libdir)
185         if [ $(LIB_TARGET) ]; then $(INSTALL_DATA) $(LIB_TARGET) $(libdir); fi
186         $(INSTALL_DATA) wine.sym $(libdir)/wine.sym
187
188 uninstall_lib: uninstall_includes
189         cd $(libdir); $(RM) $(LIB_TARGET)
190         $(RM) $(libdir)/wine.sym
191
192 install_includes: dummy
193         [ -d $(includedir) ] || $(MKDIR) $(includedir)
194         cd $(TOPSRCDIR)/include; $(INSTALL_DATA) windows.h wintypes.h $(includedir)
195
196 # Don't just do a rm -rf on $(includedir) -- don't want to wipe out 
197 # anything extra the user may have put there.
198 uninstall_includes: dummy
199         $(RM) $(includedir)/windows.h $(includedir)/wintypes.h
200         -rmdir $(includedir)
201
202 $(ALLSUBDIRS): dummy
203         @cd $@; $(SUBMAKE)
204
205 install_programs: dummy
206         @cd programs; $(SUBMAKE) install
207
208 uninstall_programs: dummy
209         @cd programs; $(SUBMAKE) uninstall
210
211 install::
212         for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
213
214 uninstall::
215         for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
216
217 depend:: dummy
218         for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
219
220 TAGS etags:
221         etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
222
223 manpages:
224         -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
225         for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
226
227 htmlpages:
228         -$(MKDIR) $(TOPOBJDIR)/documentation/html
229         for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
230
231 clean::
232         for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
233         for i in include; do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
234         $(RM) wine wine.sym libwine.a libwine.so.1.0 libwine.so TAGS .#*
235
236 distclean: clean
237         $(RM) config.* Make.rules include/config.h
238         $(RM) `find . \( -name Makefile -o -size 0 \) -print`
239
240 # We depend on configure above for checks, so we better don't use this rule.
241 #configure: configure.in
242 #       autoconf
243
244 include/config.h.in: configure.in include/acconfig.h
245         autoheader -l include
246
247 ### Dependencies: