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