Removed the dependency on "dummy" for wine and wine.sym.
[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 TOOLSUBDIRS = \
27         tools \
28         tools/wrc
29
30 LIBSUBDIRS = \
31         controls \
32         console \
33         dlls/advapi32 \
34         dlls/avifil32 \
35         dlls/comctl32 \
36         dlls/commdlg \
37         dlls/imagehlp \
38         dlls/msacm \
39         dlls/msacm32 \
40         dlls/ntdll \
41         dlls/psapi \
42         dlls/rasapi32 \
43         dlls/shell32 \
44         dlls/tapi32 \
45         dlls/ver \
46         dlls/version \
47         dlls/win87em \
48         dlls/winaspi \
49         dlls/winspool \
50         dlls/wnaspi32 \
51         files \
52         graphics \
53         graphics/enhmetafiledrv \
54         graphics/metafiledrv \
55         graphics/psdrv \
56         graphics/ttydrv \
57         graphics/win16drv \
58         if1632 \
59         library \
60         loader \
61         loader/ne \
62         loader/dos \
63         memory \
64         misc \
65         msdos \
66         multimedia \
67         objects \
68         ole \
69         relay32 \
70         resources \
71         scheduler \
72         server \
73         win32 \
74         windows \
75         windows/ttydrv
76
77 X11SUBDIRS = \
78         graphics/x11drv \
79         tsx11 \
80         windows/x11drv
81
82 EMUSUBDIRS = \
83         debugger \
84         miscemu
85
86 PROGSUBDIRS = libtest programs
87
88 DOCSUBDIRS = documentation
89
90 INCSUBDIRS = include
91
92 # Sub-directories to run make into
93 BUILDSUBDIRS = \
94         $(TOOLSUBDIRS) \
95         $(LIBSUBDIRS) \
96         $(X11SUBDIRS) \
97         $(EMUSUBDIRS) \
98         $(PROGSUBDIRS) \
99         $(DOCSUBDIRS)
100
101 # Sub-directories to run make depend into
102 DEPENDSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
103
104 # Sub-directories to run make install into
105 INSTALLSUBDIRS = $(DOCSUBDIRS) $(INCSUBDIRS)
106
107 # Sub-directories to run make lint into
108 LINTSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
109
110 LIBOBJS = \
111         controls/controls.o \
112         console/console.o \
113         dlls/advapi32/advapi32.o \
114         dlls/avifil32/avifil32.o \
115         dlls/comctl32/comctl32.o \
116         dlls/commdlg/commdlg.o \
117         dlls/imagehlp/imagehlp.o \
118         dlls/msacm/msacm.o \
119         dlls/msacm32/msacm32.o \
120         dlls/ntdll/ntdll.o \
121         dlls/psapi/psapi.o \
122         dlls/rasapi32/rasapi32.o \
123         dlls/shell32/shell32.o \
124         dlls/tapi32/tapi32.o \
125         dlls/ver/ver.o \
126         dlls/version/version.o \
127         dlls/win87em/win87em.o \
128         dlls/winaspi/winaspi.o \
129         dlls/winspool/winspool.o \
130         dlls/wnaspi32/wnaspi32.o \
131         files/files.o \
132         graphics/graphics.o \
133         graphics/enhmetafiledrv/enhmetafiledrv.o \
134         graphics/metafiledrv/metafiledrv.o \
135         graphics/psdrv/psdrv.o \
136         graphics/ttydrv/ttydrv.o \
137         graphics/win16drv/win16drv.o \
138         if1632/if1632.o \
139         loader/loader.o \
140         loader/ne/ne.o \
141         loader/dos/dos.o \
142         memory/memory.o \
143         misc/misc.o \
144         msdos/msdos.o \
145         multimedia/multimedia.o \
146         objects/objects.o \
147         ole/ole.o \
148         relay32/relay32.o \
149         resources/resources.o \
150         scheduler/scheduler.o \
151         server/server.o \
152         win32/win32.o \
153         windows/windows.o \
154         windows/ttydrv/ttydrv.o
155
156 X11OBJS = \
157         graphics/x11drv/x11drv.o \
158         tsx11/tsx11.o \
159         windows/x11drv/x11drv.o
160
161 EMUOBJS = \
162         debugger/debugger.o \
163         miscemu/miscemu.o
164
165 LIB_TARGET  = @LIB_TARGET@
166
167 ALT_LINK    = @ALT_LINK@
168
169 all: Makefile Make.rules $(MAIN_TARGET)
170         @echo "Wine build complete."
171
172 LIBLINTS = $(LIBOBJS:.o=.ln) 
173 X11LINTS = $(X11OBJS:.o=.ln)
174 EMULINTS = $(EMUOBJS:.o=.ln)
175
176 lint:: llib-lwine.ln $(EMULINTS)
177         $(LINT) $(ALLLINTFLAGS) -L. -lwine $(EMULINTS)
178
179 @MAKE_RULES@
180
181 Make.rules: Make.rules.in configure
182         @echo $? is newer than 'Make.rules', please rerun ./configure!
183         @exit 1
184
185 install:: install_$(MAIN_TARGET)
186
187 uninstall:: uninstall_$(MAIN_TARGET)
188
189 emu: wine
190
191 lib: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET)
192
193 wine wine.sym: $(LIB_TARGET) $(EMUOBJS) $(X11OBJS) $(LIBOBJS)
194         $(CC) -o wine $(EMUOBJS) $(ALT_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
195         nm -n wine | grep -v _compiled >wine.sym
196
197 libwine.a: $(LIBOBJS) $(X11OBJS)
198         $(RM) $@
199         $(AR) $@ $(LIBOBJS) $(X11OBJS)
200         $(RANLIB) $@
201
202 llib-lwine.ln : $(LIBLINTS) $(X11LINTS)
203         $(LINT) $(ALLLINTFLAGS) -owine $(LIBLINTS) $(X11LINTS)
204
205 libwine.so.1.0: $(LIBOBJS) $(X11OBJS)
206         $(LDSHARED) -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS)
207         ln -sf $@ libwine.so
208
209 install_emu: install_lib
210         [ -d $(bindir) ] || $(MKDIR) $(bindir)
211         $(INSTALL_PROGRAM) wine $(bindir)/wine
212         $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
213
214 uninstall_emu: uninstall_lib
215         $(RM) $(bindir)/wine $(bindir)/dosmod
216
217 install_lib: dummy
218         [ -d $(libdir) ] || $(MKDIR) $(libdir)
219         if [ -f wine.sym ]; then $(INSTALL_DATA) wine.sym $(libdir)/wine.sym; fi
220         if [ $(LIB_TARGET) ]; then \
221             $(INSTALL_DATA) $(LIB_TARGET) $(libdir); \
222             if [ $(LIB_TARGET) = libwine.so.1.0 ]; then $(LDCONFIG); fi \
223         fi
224
225 uninstall_lib: dummy
226         cd $(libdir); $(RM) $(LIB_TARGET) libwine.a libwine.so wine.sym
227
228 $(X11OBJS) $(EMUOBJS) $(LIBOBJS): $(TOOLSUBDIRS) dummy
229         @cd `dirname $@`; $(SUBMAKE)
230
231 $(BUILDSUBDIRS): dummy
232         @cd $@; $(SUBMAKE)
233
234 $(LIBLINTS) $(X11LINTS) $(EMULINTS): dummy
235         @echo $@ | sed 's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
236
237
238 install_programs: dummy
239         @cd programs; $(SUBMAKE) install
240
241 uninstall_programs: dummy
242         @cd programs; $(SUBMAKE) uninstall
243
244 install::
245         for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
246
247 uninstall::
248         for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
249
250 depend:: dummy
251         for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
252
253 TAGS etags:
254         etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
255
256 manpages:
257         -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
258         for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
259
260 htmlpages:
261         -$(MKDIR) $(TOPOBJDIR)/documentation/html
262         for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
263
264 clean::
265         for i in $(BUILDSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
266         for i in include include/bitmaps include/wine; do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
267         $(RM) wine wine.sym libwine.a libwine.so.1.0 libwine.so TAGS .#*
268
269 distclean: clean
270         $(RM) config.* Make.rules include/config.h documentation/wine.man
271         $(RM) `find . \( -name Makefile -o -size 0 \) -print`
272
273 # We depend on configure above for checks, so we better don't use this rule.
274 #configure: configure.in
275 #       autoconf
276
277 include/config.h.in: configure.in include/acconfig.h
278         autoheader -l include
279
280 ### Dependencies: