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@
70 graphics/enhmetafiledrv \
71 graphics/metafiledrv \
103 PROGSUBDIRS = libtest programs
105 DOCSUBDIRS = documentation
109 # Sub-directories to run make into
118 # Sub-directories to run make depend into
119 DEPENDSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
121 # Sub-directories to run make install into
122 INSTALLSUBDIRS = $(DOCSUBDIRS) $(INCSUBDIRS)
124 # Sub-directories to run make lint into
125 LINTSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
128 controls/controls.o \
130 dlls/advapi32/advapi32.o \
131 dlls/avifil32/avifil32.o \
132 dlls/comctl32/comctl32.o \
133 dlls/commdlg/commdlg.o \
134 dlls/crtdll/crtdll.o \
135 dlls/dciman32/dciman32.o \
136 dlls/imagehlp/imagehlp.o \
138 dlls/lzexpand/lzexpand.o \
141 dlls/msacm32/msacm32.o \
142 dlls/msnet32/msnet32.o \
143 dlls/msvideo/msvideo.o \
146 dlls/oleaut32/oleaut32.o \
147 dlls/olecli/olecli.o \
148 dlls/oledlg/oledlg.o \
149 dlls/olesvr/olesvr.o \
151 dlls/rasapi32/rasapi32.o \
152 dlls/shell32/shell32.o \
154 dlls/stress/stress.o \
155 dlls/tapi32/tapi32.o \
157 dlls/version/version.o \
158 dlls/win32s/win32s.o \
159 dlls/win87em/win87em.o \
160 dlls/winaspi/winaspi.o \
161 dlls/windebug/windebug.o \
163 dlls/winspool/winspool.o \
164 dlls/wnaspi32/wnaspi32.o \
166 graphics/graphics.o \
167 graphics/enhmetafiledrv/enhmetafiledrv.o \
168 graphics/metafiledrv/metafiledrv.o \
169 graphics/psdrv/psdrv.o \
170 graphics/ttydrv/ttydrv.o \
171 graphics/win16drv/win16drv.o \
179 multimedia/multimedia.o \
183 resources/resources.o \
184 scheduler/scheduler.o \
188 windows/ttydrv/ttydrv.o
191 graphics/x11drv/x11drv.o \
193 windows/x11drv/x11drv.o
196 debugger/debugger.o \
199 LIB_TARGET = @LIB_TARGET@
201 ALT_LINK = @ALT_LINK@
203 all: Makefile Make.rules $(MAIN_TARGET)
204 @echo "Wine build complete."
206 LIBLINTS = $(LIBOBJS:.o=.ln)
207 X11LINTS = $(X11OBJS:.o=.ln)
208 EMULINTS = $(EMUOBJS:.o=.ln)
210 lint:: llib-lwine.ln $(EMULINTS)
211 $(LINT) $(ALLLINTFLAGS) -L. -lwine $(EMULINTS)
215 Make.rules: Make.rules.in configure
216 @echo $? is newer than 'Make.rules', please rerun ./configure!
219 install:: install_$(MAIN_TARGET)
221 uninstall:: uninstall_$(MAIN_TARGET)
225 lib: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET)
227 wine wine.sym: $(LIB_TARGET) $(EMUOBJS) $(X11OBJS) $(LIBOBJS)
228 $(CC) -o wine $(EMUOBJS) $(ALT_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
229 nm -n wine | grep -v _compiled >wine.sym
231 libwine.a: $(LIBOBJS) $(X11OBJS)
233 $(AR) $@ $(LIBOBJS) $(X11OBJS)
236 llib-lwine.ln : $(LIBLINTS) $(X11LINTS)
237 $(LINT) $(ALLLINTFLAGS) -owine $(LIBLINTS) $(X11LINTS)
239 libwine.so.1.0: $(LIBOBJS) $(X11OBJS)
240 $(LDSHARED) -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS)
243 install_emu: install_lib
244 [ -d $(bindir) ] || $(MKDIR) $(bindir)
245 $(INSTALL_PROGRAM) wine $(bindir)/wine
246 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
248 uninstall_emu: uninstall_lib
249 $(RM) $(bindir)/wine $(bindir)/dosmod
252 [ -d $(libdir) ] || $(MKDIR) $(libdir)
253 if [ -f wine.sym ]; then $(INSTALL_DATA) wine.sym $(libdir)/wine.sym; fi
254 if [ $(LIB_TARGET) ]; then \
255 $(INSTALL_DATA) $(LIB_TARGET) $(libdir); \
256 if [ $(LIB_TARGET) = libwine.so.1.0 ]; then $(LDCONFIG); fi \
260 cd $(libdir); $(RM) $(LIB_TARGET) libwine.a libwine.so wine.sym
262 $(X11OBJS) $(EMUOBJS) $(LIBOBJS): $(TOOLSUBDIRS) dummy
263 @cd `dirname $@`; $(SUBMAKE)
265 $(BUILDSUBDIRS): dummy
268 $(LIBLINTS) $(X11LINTS) $(EMULINTS): dummy
269 @echo $@ | sed 's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
272 install_programs: dummy
273 @cd programs; $(SUBMAKE) install
275 uninstall_programs: dummy
276 @cd programs; $(SUBMAKE) uninstall
279 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
282 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
285 for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
288 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
291 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
292 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
295 -$(MKDIR) $(TOPOBJDIR)/documentation/html
296 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
299 for i in $(BUILDSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
300 for i in include include/bitmaps include/wine; do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
301 $(RM) wine wine.sym libwine.a libwine.so.1.0 libwine.so TAGS .#*
304 $(RM) config.* Make.rules include/config.h documentation/wine.man documentation/wine.conf.man
305 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
307 # We depend on configure above for checks, so we better don't use this rule.
308 #configure: configure.in
311 include/config.h.in: configure.in include/acconfig.h
312 autoheader -l include