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