1 # This Makefile understands the following targets:
3 # all (default): build wine
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@
20 TOPSRCDIR = @top_srcdir@
73 graphics/enhmetafiledrv \
74 graphics/metafiledrv \
106 PROGSUBDIRS = libtest programs
108 DOCSUBDIRS = documentation
112 # Sub-directories to run make into
121 # Sub-directories to run make depend into
122 DEPENDSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
124 # Sub-directories to run make install into
125 INSTALLSUBDIRS = $(DOCSUBDIRS) $(INCSUBDIRS)
127 # Sub-directories to run make lint into
128 LINTSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
131 controls/controls.o \
133 dlls/advapi32/advapi32.o \
134 dlls/avifil32/avifil32.o \
135 dlls/comctl32/comctl32.o \
136 dlls/commdlg/commdlg.o \
137 dlls/crtdll/crtdll.o \
138 dlls/dciman32/dciman32.o \
139 dlls/dplayx/dplayx.o \
140 dlls/imagehlp/imagehlp.o \
142 dlls/lzexpand/lzexpand.o \
145 dlls/msacm32/msacm32.o \
146 dlls/msnet32/msnet32.o \
147 dlls/msvideo/msvideo.o \
150 dlls/oleaut32/oleaut32.o \
151 dlls/olecli/olecli.o \
152 dlls/oledlg/oledlg.o \
153 dlls/olesvr/olesvr.o \
155 dlls/rasapi32/rasapi32.o \
156 dlls/shell32/shell32.o \
158 dlls/stress/stress.o \
159 dlls/tapi32/tapi32.o \
161 dlls/version/version.o \
162 dlls/win32s/win32s.o \
163 dlls/win87em/win87em.o \
164 dlls/winaspi/winaspi.o \
165 dlls/windebug/windebug.o \
166 dlls/winmm/wineoss/wineoss.o \
168 dlls/winspool/winspool.o \
169 dlls/wnaspi32/wnaspi32.o \
171 graphics/graphics.o \
172 graphics/enhmetafiledrv/enhmetafiledrv.o \
173 graphics/metafiledrv/metafiledrv.o \
174 graphics/psdrv/psdrv.o \
175 graphics/ttydrv/ttydrv.o \
176 graphics/win16drv/win16drv.o \
184 multimedia/multimedia.o \
188 resources/resources.o \
189 scheduler/scheduler.o \
193 windows/ttydrv/ttydrv.o
196 graphics/x11drv/x11drv.o \
198 windows/x11drv/x11drv.o
201 debugger/debugger.o \
204 LIB_TARGET = @LIB_TARGET@
206 ALT_LINK = @ALT_LINK@
208 all: Makefile Make.rules $(MAIN_TARGET)
209 @echo "Wine build complete."
211 LIBLINTS = $(LIBOBJS:.o=.ln)
212 X11LINTS = $(X11OBJS:.o=.ln)
213 EMULINTS = $(EMUOBJS:.o=.ln)
215 lint:: llib-lwine.ln $(EMULINTS)
216 $(LINT) $(ALLLINTFLAGS) -L. -lwine $(EMULINTS)
220 Make.rules: Make.rules.in configure
221 @echo $? is newer than 'Make.rules', please rerun ./configure!
224 install:: install_$(MAIN_TARGET)
226 uninstall:: uninstall_$(MAIN_TARGET)
230 lib: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET)
232 wine wine.sym: $(LIB_TARGET) $(EMUOBJS) $(X11OBJS) $(LIBOBJS)
233 $(CC) -o wine $(EMUOBJS) $(ALT_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
234 nm -n wine | grep -v _compiled >wine.sym
236 libwine.a: $(LIBOBJS) $(X11OBJS)
238 $(AR) $@ $(LIBOBJS) $(X11OBJS)
241 llib-lwine.ln : $(LIBLINTS) $(X11LINTS)
242 $(LINT) $(ALLLINTFLAGS) -owine $(LIBLINTS) $(X11LINTS)
244 libwine.so.1.0: $(LIBOBJS) $(X11OBJS)
245 $(LDSHARED) -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS)
248 install_emu: install_lib
249 [ -d $(bindir) ] || $(MKDIR) $(bindir)
250 $(INSTALL_PROGRAM) wine $(bindir)/wine
251 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
253 uninstall_emu: uninstall_lib
254 $(RM) $(bindir)/wine $(bindir)/dosmod
257 [ -d $(libdir) ] || $(MKDIR) $(libdir)
258 if [ -f wine.sym ]; then $(INSTALL_DATA) wine.sym $(libdir)/wine.sym; fi
259 if [ $(LIB_TARGET) ]; then \
260 $(INSTALL_DATA) $(LIB_TARGET) $(libdir); \
261 if [ $(LIB_TARGET) = libwine.so.1.0 ]; then $(LDCONFIG); fi \
263 [ -d $(bindir) ] || $(MKDIR) $(bindir)
264 $(INSTALL_PROGRAM) windows/x11drv/wineclipsrv $(bindir)/wineclipsrv
267 cd $(libdir); $(RM) $(LIB_TARGET) libwine.a libwine.so wine.sym
269 $(X11OBJS) $(EMUOBJS) $(LIBOBJS): $(TOOLSUBDIRS) dummy
270 @cd `dirname $@`; $(SUBMAKE)
272 $(BUILDSUBDIRS): dummy
275 $(LIBLINTS) $(X11LINTS) $(EMULINTS): dummy
276 @echo $@ | sed 's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
279 install_programs: dummy
280 @cd programs; $(SUBMAKE) install
282 uninstall_programs: dummy
283 @cd programs; $(SUBMAKE) uninstall
286 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
289 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
292 for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
295 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
298 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
299 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
302 -$(MKDIR) $(TOPOBJDIR)/documentation/html
303 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
306 for i in $(BUILDSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
307 for i in include include/bitmaps include/wine; do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
308 $(RM) wine wine.sym libwine.a libwine.so.1.0 libwine.so TAGS .#*
311 $(RM) config.* Make.rules include/config.h documentation/wine.man documentation/wine.conf.man
312 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
314 # We depend on configure above for checks, so we better don't use this rule.
315 #configure: configure.in
318 include/config.h.in: configure.in include/acconfig.h
319 autoheader -l include