- detect if the OpenGL implementation defines the paletted texture and
[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/ver \
66         dlls/version \
67         dlls/win32s \
68         dlls/win87em \
69         dlls/winaspi \
70         dlls/windebug \
71         dlls/wing \
72         dlls/winmm \
73         dlls/winmm/mcianim \
74         dlls/winmm/mciavi \
75         dlls/winmm/mcicda \
76         dlls/winmm/mciseq \
77         dlls/winmm/mciwave \
78         dlls/winmm/midimap \
79         dlls/winmm/wavemap \
80         dlls/winmm/wineoss \
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         server \
104         win32 \
105         windows \
106         windows/ttydrv
107
108 X11SUBDIRS = \
109         graphics/x11drv \
110         tsx11 \
111         windows/x11drv
112
113 EMUSUBDIRS = \
114         debugger \
115         miscemu
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/ver/ver.o \
180         dlls/version/version.o \
181         dlls/win32s/win32s.o \
182         dlls/win87em/win87em.o \
183         dlls/winaspi/winaspi.o \
184         dlls/windebug/windebug.o \
185         dlls/wing/wing.o \
186         dlls/winmm/winmm.o \
187         dlls/winmm/mcianim/mcianim.drv.o \
188         dlls/winmm/mciavi/mciavi.drv.o \
189         dlls/winmm/mcicda/mcicda.drv.o \
190         dlls/winmm/mciseq/mciseq.drv.o \
191         dlls/winmm/mciwave/mciwave.drv.o \
192         dlls/winmm/midimap/midimap.drv.o \
193         dlls/winmm/wavemap/msacm.drv.o \
194         dlls/winmm/wineoss/wineoss.drv.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         server/server.o \
217         win32/win32.o \
218         windows/windows.o \
219         windows/ttydrv/ttydrv.o
220
221 X11OBJS = \
222         graphics/x11drv/x11drv.o \
223         tsx11/tsx11.o \
224         windows/x11drv/x11drv.o
225
226 EMUOBJS = \
227         debugger/debugger.o \
228         miscemu/miscemu.o
229
230 LIB_TARGET  = @LIB_TARGET@
231
232 ALT_LINK    = @ALT_LINK@
233
234 all: Makefile Make.rules $(MAIN_TARGET)
235         @echo "Wine build complete."
236
237 LIBLINTS = $(LIBOBJS:.o=.ln) 
238 X11LINTS = $(X11OBJS:.o=.ln)
239 EMULINTS = $(EMUOBJS:.o=.ln)
240
241 lint:: llib-lwine.ln $(EMULINTS)
242         $(LINT) $(ALLLINTFLAGS) -L. -lwine $(EMULINTS)
243
244 WINAPI_CHECK_EXTRA_FLAGS = --global
245
246 @MAKE_RULES@
247
248 Make.rules: Make.rules.in configure
249         @echo $? is newer than 'Make.rules', please rerun ./configure!
250         @exit 1
251
252 install:: install_$(MAIN_TARGET)
253
254 uninstall:: uninstall_$(MAIN_TARGET)
255
256 emu: wine
257
258 lib: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET)
259
260 wine wine.sym: $(LIB_TARGET) $(EMUOBJS) $(X11OBJS) $(LIBOBJS)
261         $(CC) -o wine $(EMUOBJS) $(ALT_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
262         nm -n wine | grep -v _compiled >wine.sym
263
264 libwine.a: $(LIBOBJS) $(X11OBJS)
265         $(RM) $@
266         $(AR) $@ $(LIBOBJS) $(X11OBJS)
267         $(RANLIB) $@
268
269 llib-lwine.ln : $(LIBLINTS) $(X11LINTS)
270         $(LINT) $(ALLLINTFLAGS) -owine $(LIBLINTS) $(X11LINTS)
271
272 libwine.so.1.0: $(LIBOBJS) $(X11OBJS)
273         $(LDSHARED) -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS)
274         $(RM) libwine.so
275         $(LN_S) $@ libwine.so
276
277 install_emu: install_lib
278         [ -d $(bindir) ] || $(MKDIR) $(bindir)
279         $(INSTALL_PROGRAM) wine $(bindir)/wine
280         $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
281
282 uninstall_emu: uninstall_lib
283         $(RM) $(bindir)/wine $(bindir)/dosmod
284
285 install_lib: dummy
286         [ -d $(libdir) ] || $(MKDIR) $(libdir)
287         if [ -f wine.sym ]; then $(INSTALL_DATA) wine.sym $(libdir)/wine.sym; fi
288         if [ $(LIB_TARGET) ]; then \
289             if [ $(LIB_TARGET) = libwine.so.1.0 ]; then \
290                 $(INSTALL_PROGRAM) $(LIB_TARGET) $(libdir); \
291                 $(LDCONFIG) || (cd $(libdir) ; $(RM) libwine.so ; $(LN_S) $(LIB_TARGET) libwine.so) ; \
292             else \
293                 $(INSTALL_DATA) $(LIB_TARGET) $(libdir); \
294             fi \
295         fi
296         [ -d $(bindir) ] || $(MKDIR) $(bindir)
297         $(INSTALL_PROGRAM) server/wineserver $(bindir)/wineserver
298         $(INSTALL_PROGRAM) windows/x11drv/wineclipsrv $(bindir)/wineclipsrv
299
300 uninstall_lib: dummy
301         cd $(libdir) && $(RM) $(LIB_TARGET) libwine.a libwine.so wine.sym
302         $(RM) $(bindir)/wineserver $(bindir)/wineclipsrv
303
304 $(X11OBJS) $(EMUOBJS) $(LIBOBJS): $(TOOLSUBDIRS) dummy
305         @cd `dirname $@`; $(SUBMAKE)
306
307 $(BUILDSUBDIRS): dummy
308         @cd $@; $(SUBMAKE)
309
310 $(LIBLINTS) $(X11LINTS) $(EMULINTS): dummy
311         @echo $@ | sed 's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
312
313
314 install_programs: dummy
315         @cd programs; $(SUBMAKE) install
316
317 uninstall_programs: dummy
318         @cd programs; $(SUBMAKE) uninstall
319
320 install::
321         for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
322
323 uninstall::
324         for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
325
326 depend:: dummy
327         for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
328
329 TAGS etags:
330         etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
331
332 manpages:
333         -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
334         for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
335
336 htmlpages:
337         -$(MKDIR) $(TOPOBJDIR)/documentation/html
338         for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
339
340 clean::
341         for i in $(BUILDSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
342         for i in $(CLEANSUBDIRS); do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
343         $(RM) wine wine.sym libwine.a libwine.so.1.0 libwine.so TAGS .#*
344
345 distclean: clean
346         $(RM) config.* Make.rules include/config.h documentation/wine.man documentation/wine.conf.man
347         $(RM) `find . \( -name Makefile -o -size 0 \) -print`
348
349 # We depend on configure above for checks, so we better don't use this rule.
350 #configure: configure.in
351 #       autoconf
352
353 include/config.h.in: configure.in include/acconfig.h
354         autoheader -l include
355
356 ### Dependencies: