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