Now relying on exception codes to know when debugger is entered for a
[wine.git] / Makefile.in
blob9bb7b414562176a513533c63adbdedda658fb89a
1 # This Makefile understands the following targets:
3 # all (default): build wine
4 # clean: remove all intermediate files
5 # distclean: also remove all files created by configure
6 # install: install everything
7 # uninstall: uninstall everything
8 # depend: create the dependencies
9 # etags: create a TAGS file for Emacs.
10 # manpages: compile manpages for Wine API
13 # Directories
15 TOPSRCDIR = @top_srcdir@
16 TOPOBJDIR = .
17 SRCDIR = @srcdir@
18 VPATH = @srcdir@
19 LIBEXT = @LIBEXT@
20 LDSHARED = @LDSHARED@
21 LDCONFIG = @LDCONFIG@
22 MODULE = wine
23 SOVERSION = 1.0
24 SONAME = libwine.so
26 TOOLSUBDIRS = \
27 tools \
28 tools/wrc
30 LIBSUBDIRS = \
31 controls \
32 console \
33 debugger \
34 dlls/advapi32 \
35 dlls/crtdll \
36 dlls/display \
37 dlls/mouse \
38 dlls/mpr \
39 dlls/ntdll \
40 files \
41 graphics \
42 graphics/enhmetafiledrv \
43 graphics/metafiledrv \
44 graphics/psdrv \
45 graphics/ttydrv \
46 graphics/win16drv \
47 if1632 \
48 library \
49 loader \
50 loader/ne \
51 loader/dos \
52 memory \
53 misc \
54 msdos \
55 objects \
56 ole \
57 relay32 \
58 resources \
59 scheduler \
60 win32 \
61 windows \
62 windows/ttydrv
64 X11SUBDIRS = \
65 graphics/x11drv \
66 tsx11 \
67 windows/x11drv
69 EMUSUBDIRS = \
70 miscemu \
71 server
73 PROGSUBDIRS = libtest programs
75 DOCSUBDIRS = documentation
77 INCSUBDIRS = include
79 PROGRAMS = \
80 loader/dos/dosmod \
81 server/wineserver \
82 windows/x11drv/wineclipsrv
84 # Sub-directories to run make into
85 BUILDSUBDIRS = \
86 $(TOOLSUBDIRS) \
87 $(LIBSUBDIRS) \
88 $(X11SUBDIRS) \
89 $(DLLDIR) \
90 $(EMUSUBDIRS) \
91 $(PROGSUBDIRS) \
92 $(DOCSUBDIRS)
94 # Sub-directories to run make depend into
95 DEPENDSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(DLLDIR) $(EMUSUBDIRS) $(DOCSUBDIRS)
97 # Sub-directories to run make install into
98 INSTALLSUBDIRS = $(DLLDIR) $(DOCSUBDIRS) $(INCSUBDIRS)
100 # Sub-directories to run make lint into
101 LINTSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(DLLDIR) $(EMUSUBDIRS) $(DOCSUBDIRS)
103 # Extra sub-directories to clean
104 CLEANSUBDIRS = dlls include include/bitmaps include/wine
106 LIBOBJS = \
107 controls/controls.o \
108 console/console.o \
109 debugger/debugger.o \
110 dlls/advapi32/advapi32.o \
111 dlls/crtdll/crtdll.o \
112 dlls/display/display.o \
113 dlls/mouse/mouse.o \
114 dlls/mpr/mpr.o \
115 dlls/ntdll/ntdll.o \
116 files/files.o \
117 graphics/graphics.o \
118 graphics/enhmetafiledrv/enhmetafiledrv.o \
119 graphics/metafiledrv/metafiledrv.o \
120 graphics/psdrv/psdrv.o \
121 graphics/ttydrv/ttydrv.o \
122 graphics/win16drv/win16drv.o \
123 if1632/if1632.o \
124 loader/loader.o \
125 loader/ne/ne.o \
126 loader/dos/dos.o \
127 memory/memory.o \
128 misc/misc.o \
129 msdos/msdos.o \
130 objects/objects.o \
131 ole/ole.o \
132 relay32/relay32.o \
133 resources/resources.o \
134 scheduler/scheduler.o \
135 win32/win32.o \
136 windows/windows.o \
137 windows/ttydrv/ttydrv.o
139 X11OBJS = \
140 graphics/x11drv/x11drv.o \
141 tsx11/tsx11.o \
142 windows/x11drv/x11drv.o
144 EMUOBJS = \
145 miscemu/miscemu.o
147 DLLOBJS = $(DLLS:%=dlls/lib%.@LIBEXT@)
149 EXTRA_OBJS = $(LIBOBJS) $(X11OBJS)
151 EMU_TARGET = @EMU_TARGET@
153 all: Make.rules $(PROGRAMS) $(EMU_TARGET)
154 @echo "Wine build complete."
156 LIBLINTS = $(LIBOBJS:.o=.ln)
157 X11LINTS = $(X11OBJS:.o=.ln)
158 EMULINTS = $(EMUOBJS:.o=.ln)
160 lint:: llib-lwine.ln $(EMULINTS)
161 $(LINT) $(ALLLINTFLAGS) -L. -lwine $(EMULINTS)
163 WINAPI_CHECK_EXTRA_FLAGS = --global
165 @MAKE_RULES@
167 all: lib$(MODULE).$(LIBEXT) $(DLLOBJS)
169 Make.rules: Make.rules.in configure
170 @echo $? is newer than 'Make.rules', please rerun ./configure!
171 @exit 1
173 wine wine.sym: lib$(MODULE).$(LIBEXT) $(DLLOBJS) $(EMUOBJS)
174 $(CC) -o wine $(EMUOBJS) $(DLL_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
175 nm -n wine | grep -v _compiled >wine.sym
177 llib-lwine.ln : $(LIBLINTS) $(X11LINTS)
178 $(LINT) $(ALLLINTFLAGS) -owine $(LIBLINTS) $(X11LINTS)
180 install_so: lib$(MODULE).so.$(SOVERSION)
181 [ -d $(libdir) ] || $(MKDIR) $(libdir)
182 $(INSTALL_PROGRAM) lib$(MODULE).so.$(SOVERSION) $(libdir)/lib$(MODULE).so.$(SOVERSION)
183 cd $(libdir) && $(RM) lib$(MODULE).so && $(LN_S) lib$(MODULE).so.$(SOVERSION) lib$(MODULE).so
185 install_a: lib$(MODULE).a
186 [ -d $(libdir) ] || $(MKDIR) $(libdir)
187 $(INSTALL_DATA) lib$(MODULE).a $(libdir)/lib$(MODULE).a
189 install_wine: wine
190 [ -d $(bindir) ] || $(MKDIR) $(bindir)
191 [ -d $(libdir) ] || $(MKDIR) $(libdir)
192 [ -f wine.sym ] && $(INSTALL_DATA) wine.sym $(libdir)/wine.sym
193 $(INSTALL_PROGRAM) wine $(bindir)/wine
195 install:: $(PROGRAMS) $(EMU_TARGET:%=install_%) $(LIBEXT:%=install_%)
196 [ -d $(bindir) ] || $(MKDIR) $(bindir)
197 $(INSTALL_PROGRAM) server/wineserver $(bindir)/wineserver
198 $(INSTALL_PROGRAM) windows/x11drv/wineclipsrv $(bindir)/wineclipsrv
199 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
201 uninstall::
202 cd $(libdir) && $(RM) libwine.a libwine.so libwine.so.$(SOVERSION) wine.sym
203 cd $(bindir) && $(RM) wine wineserver wineclipsrv dosmod
205 lib$(MODULE).so.$(SOVERSION): $(OBJS) Makefile.in Make.rules.in
206 $(LDSHARED) $(OBJS) -o $@
208 lib$(MODULE).so: lib$(MODULE).so.$(SOVERSION)
209 $(RM) $@ && $(LN_S) lib$(MODULE).so.$(SOVERSION) $@
211 lib$(MODULE).a: $(OBJS) Makefile.in Make.rules.in
212 $(RM) $@
213 $(AR) $@ $(OBJS)
214 $(RANLIB) $@
216 checklink::
217 $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c -L. -lwine $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS) && $(RM) checklink
219 $(X11OBJS) $(EMUOBJS) $(LIBOBJS) $(DLLOBJS) $(PROGRAMS): $(TOOLSUBDIRS) dummy
220 @cd `dirname $@` && $(MAKE) `basename $@`
222 $(BUILDSUBDIRS): dummy
223 @cd $@ && $(MAKE)
225 $(LIBLINTS) $(X11LINTS) $(EMULINTS): dummy
226 @echo $@ | sed 's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
228 install_programs: dummy
229 @cd programs && $(MAKE) install
231 uninstall_programs: dummy
232 @cd programs && $(MAKE) uninstall
234 install::
235 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
236 -$(LDCONFIG)
238 uninstall::
239 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
241 depend::
242 for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
244 checklink::
245 @cd dlls && $(MAKE) checklink
247 TAGS etags:
248 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
250 manpages:
251 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
252 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
254 htmlpages:
255 -$(MKDIR) $(TOPOBJDIR)/documentation/html
256 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
258 clean::
259 for i in $(BUILDSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
260 for i in $(CLEANSUBDIRS); do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
261 $(RM) wine wine.sym libwine.so.1.0 TAGS .#*
263 distclean: clean
264 $(RM) config.* Make.rules dlls/Makedll.rules include/config.h documentation/wine.man documentation/wine.conf.man
265 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
267 # We depend on configure above for checks, so we better don't use this rule.
268 #configure: configure.in
269 # autoconf
271 include/config.h.in: configure.in include/acconfig.h
272 autoheader -l include
274 ### Dependencies: