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