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@
72 graphics/enhmetafiledrv \
73 graphics/metafiledrv \
105 PROGSUBDIRS = libtest programs
107 DOCSUBDIRS = documentation
111 # Sub-directories to run make into
120 # Sub-directories to run make depend into
121 DEPENDSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
123 # Sub-directories to run make install into
124 INSTALLSUBDIRS = $(DOCSUBDIRS) $(INCSUBDIRS)
126 # Sub-directories to run make lint into
127 LINTSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
130 controls/controls.o \
132 dlls/advapi32/advapi32.o \
133 dlls/avifil32/avifil32.o \
134 dlls/comctl32/comctl32.o \
135 dlls/commdlg/commdlg.o \
136 dlls/crtdll/crtdll.o \
137 dlls/dciman32/dciman32.o \
138 dlls/imagehlp/imagehlp.o \
140 dlls/lzexpand/lzexpand.o \
143 dlls/msacm32/msacm32.o \
144 dlls/msnet32/msnet32.o \
145 dlls/msvideo/msvideo.o \
148 dlls/oleaut32/oleaut32.o \
149 dlls/olecli/olecli.o \
150 dlls/oledlg/oledlg.o \
151 dlls/olesvr/olesvr.o \
153 dlls/rasapi32/rasapi32.o \
154 dlls/shell32/shell32.o \
156 dlls/stress/stress.o \
157 dlls/tapi32/tapi32.o \
159 dlls/version/version.o \
160 dlls/win32s/win32s.o \
161 dlls/win87em/win87em.o \
162 dlls/winaspi/winaspi.o \
163 dlls/windebug/windebug.o \
164 dlls/winmm/wineoss/wineoss.o \
166 dlls/winspool/winspool.o \
167 dlls/wnaspi32/wnaspi32.o \
169 graphics/graphics.o \
170 graphics/enhmetafiledrv/enhmetafiledrv.o \
171 graphics/metafiledrv/metafiledrv.o \
172 graphics/psdrv/psdrv.o \
173 graphics/ttydrv/ttydrv.o \
174 graphics/win16drv/win16drv.o \
182 multimedia/multimedia.o \
186 resources/resources.o \
187 scheduler/scheduler.o \
191 windows/ttydrv/ttydrv.o
194 graphics/x11drv/x11drv.o \
196 windows/x11drv/x11drv.o
199 debugger/debugger.o \
202 LIB_TARGET = @LIB_TARGET@
204 ALT_LINK = @ALT_LINK@
206 all: Makefile Make.rules $(MAIN_TARGET)
207 @echo "Wine build complete."
209 LIBLINTS = $(LIBOBJS:.o=.ln)
210 X11LINTS = $(X11OBJS:.o=.ln)
211 EMULINTS = $(EMUOBJS:.o=.ln)
213 lint:: llib-lwine.ln $(EMULINTS)
214 $(LINT) $(ALLLINTFLAGS) -L. -lwine $(EMULINTS)
218 Make.rules: Make.rules.in configure
219 @echo $? is newer than 'Make.rules', please rerun ./configure!
222 install:: install_$(MAIN_TARGET)
224 uninstall:: uninstall_$(MAIN_TARGET)
228 lib: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET)
230 wine wine.sym: $(LIB_TARGET) $(EMUOBJS) $(X11OBJS) $(LIBOBJS)
231 $(CC) -o wine $(EMUOBJS) $(ALT_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
232 nm -n wine | grep -v _compiled >wine.sym
234 libwine.a: $(LIBOBJS) $(X11OBJS)
236 $(AR) $@ $(LIBOBJS) $(X11OBJS)
239 llib-lwine.ln : $(LIBLINTS) $(X11LINTS)
240 $(LINT) $(ALLLINTFLAGS) -owine $(LIBLINTS) $(X11LINTS)
242 libwine.so.1.0: $(LIBOBJS) $(X11OBJS)
243 $(LDSHARED) -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS)
246 install_emu: install_lib
247 [ -d $(bindir) ] || $(MKDIR) $(bindir)
248 $(INSTALL_PROGRAM) wine $(bindir)/wine
249 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
251 uninstall_emu: uninstall_lib
252 $(RM) $(bindir)/wine $(bindir)/dosmod
255 [ -d $(libdir) ] || $(MKDIR) $(libdir)
256 if [ -f wine.sym ]; then $(INSTALL_DATA) wine.sym $(libdir)/wine.sym; fi
257 if [ $(LIB_TARGET) ]; then \
258 $(INSTALL_DATA) $(LIB_TARGET) $(libdir); \
259 if [ $(LIB_TARGET) = libwine.so.1.0 ]; then $(LDCONFIG); fi \
261 [ -d $(bindir) ] || $(MKDIR) $(bindir)
262 $(INSTALL_PROGRAM) windows/x11drv/wineclipsrv $(bindir)/wineclipsrv
265 cd $(libdir); $(RM) $(LIB_TARGET) libwine.a libwine.so wine.sym
267 $(X11OBJS) $(EMUOBJS) $(LIBOBJS): $(TOOLSUBDIRS) dummy
268 @cd `dirname $@`; $(SUBMAKE)
270 $(BUILDSUBDIRS): dummy
273 $(LIBLINTS) $(X11LINTS) $(EMULINTS): dummy
274 @echo $@ | sed 's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
277 install_programs: dummy
278 @cd programs; $(SUBMAKE) install
280 uninstall_programs: dummy
281 @cd programs; $(SUBMAKE) uninstall
284 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
287 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
290 for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
293 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
296 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
297 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
300 -$(MKDIR) $(TOPOBJDIR)/documentation/html
301 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
304 for i in $(BUILDSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
305 for i in include include/bitmaps include/wine; do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
306 $(RM) wine wine.sym libwine.a libwine.so.1.0 libwine.so TAGS .#*
309 $(RM) config.* Make.rules include/config.h documentation/wine.man documentation/wine.conf.man
310 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
312 # We depend on configure above for checks, so we better don't use this rule.
313 #configure: configure.in
316 include/config.h.in: configure.in include/acconfig.h
317 autoheader -l include