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@
64 graphics/enhmetafiledrv \
65 graphics/metafiledrv \
97 PROGSUBDIRS = libtest programs
99 DOCSUBDIRS = documentation
103 # Sub-directories to run make into
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)
122 controls/controls.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 \
132 dlls/lzexpand/lzexpand.o \
134 dlls/msacm32/msacm32.o \
135 dlls/msnet32/msnet32.o \
136 dlls/msvideo/msvideo.o \
139 dlls/rasapi32/rasapi32.o \
140 dlls/shell32/shell32.o \
142 dlls/stress/stress.o \
143 dlls/tapi32/tapi32.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 \
151 dlls/winspool/winspool.o \
152 dlls/wnaspi32/wnaspi32.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 \
167 multimedia/multimedia.o \
171 resources/resources.o \
172 scheduler/scheduler.o \
176 windows/ttydrv/ttydrv.o
179 graphics/x11drv/x11drv.o \
181 windows/x11drv/x11drv.o
184 debugger/debugger.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)
203 Make.rules: Make.rules.in configure
204 @echo $? is newer than 'Make.rules', please rerun ./configure!
207 install:: install_$(MAIN_TARGET)
209 uninstall:: uninstall_$(MAIN_TARGET)
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)
221 $(AR) $@ $(LIBOBJS) $(X11OBJS)
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)
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
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 \
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
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
267 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
270 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
273 for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
276 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
279 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
280 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
283 -$(MKDIR) $(TOPOBJDIR)/documentation/html
284 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
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 .#*
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
299 include/config.h.in: configure.in include/acconfig.h
300 autoheader -l include