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