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@
81 graphics/enhmetafiledrv \
82 graphics/metafiledrv \
113 PROGSUBDIRS = libtest programs
115 DOCSUBDIRS = documentation
119 # Sub-directories to run make into
128 # Sub-directories to run make depend into
129 DEPENDSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
131 # Sub-directories to run make install into
132 INSTALLSUBDIRS = $(DOCSUBDIRS) $(INCSUBDIRS)
134 # Sub-directories to run make lint into
135 LINTSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
138 controls/controls.o \
140 dlls/advapi32/advapi32.o \
141 dlls/avifil32/avifil32.o \
142 dlls/comctl32/comctl32.o \
143 dlls/commdlg/commdlg.o \
144 dlls/crtdll/crtdll.o \
145 dlls/dciman32/dciman32.o \
146 dlls/dplayx/dplayx.o \
147 dlls/dsound/dsound.o \
148 dlls/imagehlp/imagehlp.o \
150 dlls/lzexpand/lzexpand.o \
153 dlls/msacm32/msacm32.o \
154 dlls/msnet32/msnet32.o \
155 dlls/msvideo/msvideo.o \
158 dlls/oleaut32/oleaut32.o \
159 dlls/olecli/olecli.o \
160 dlls/oledlg/oledlg.o \
161 dlls/olesvr/olesvr.o \
163 dlls/rasapi32/rasapi32.o \
164 dlls/shell32/shell32.o \
166 dlls/stress/stress.o \
167 dlls/tapi32/tapi32.o \
169 dlls/version/version.o \
170 dlls/win32s/win32s.o \
171 dlls/win87em/win87em.o \
172 dlls/winaspi/winaspi.o \
173 dlls/windebug/windebug.o \
176 dlls/winmm/mcianim/mcianim.drv.o \
177 dlls/winmm/mciavi/mciavi.drv.o \
178 dlls/winmm/mcicda/mcicda.drv.o \
179 dlls/winmm/mciseq/mciseq.drv.o \
180 dlls/winmm/mciwave/mciwave.drv.o \
181 dlls/winmm/midimap/midimap.drv.o \
182 dlls/winmm/wavemap/msacm.drv.o \
183 dlls/winmm/wineoss/wineoss.o \
184 dlls/winspool/winspool.o \
185 dlls/wnaspi32/wnaspi32.o \
187 graphics/graphics.o \
188 graphics/enhmetafiledrv/enhmetafiledrv.o \
189 graphics/metafiledrv/metafiledrv.o \
190 graphics/psdrv/psdrv.o \
191 graphics/ttydrv/ttydrv.o \
192 graphics/win16drv/win16drv.o \
203 resources/resources.o \
204 scheduler/scheduler.o \
208 windows/ttydrv/ttydrv.o
211 graphics/x11drv/x11drv.o \
213 windows/x11drv/x11drv.o
216 debugger/debugger.o \
219 LIB_TARGET = @LIB_TARGET@
221 ALT_LINK = @ALT_LINK@
223 all: Makefile Make.rules $(MAIN_TARGET)
224 @echo "Wine build complete."
226 LIBLINTS = $(LIBOBJS:.o=.ln)
227 X11LINTS = $(X11OBJS:.o=.ln)
228 EMULINTS = $(EMUOBJS:.o=.ln)
230 lint:: llib-lwine.ln $(EMULINTS)
231 $(LINT) $(ALLLINTFLAGS) -L. -lwine $(EMULINTS)
233 WINAPI_CHECK_EXTRA_FLAGS = --global
237 Make.rules: Make.rules.in configure
238 @echo $? is newer than 'Make.rules', please rerun ./configure!
241 install:: install_$(MAIN_TARGET)
243 uninstall:: uninstall_$(MAIN_TARGET)
247 lib: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET)
249 wine wine.sym: $(LIB_TARGET) $(EMUOBJS) $(X11OBJS) $(LIBOBJS)
250 $(CC) -o wine $(EMUOBJS) $(ALT_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
251 nm -n wine | grep -v _compiled >wine.sym
253 libwine.a: $(LIBOBJS) $(X11OBJS)
255 $(AR) $@ $(LIBOBJS) $(X11OBJS)
258 llib-lwine.ln : $(LIBLINTS) $(X11LINTS)
259 $(LINT) $(ALLLINTFLAGS) -owine $(LIBLINTS) $(X11LINTS)
261 libwine.so.1.0: $(LIBOBJS) $(X11OBJS)
262 $(LDSHARED) -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS)
265 install_emu: install_lib
266 [ -d $(bindir) ] || $(MKDIR) $(bindir)
267 $(INSTALL_PROGRAM) wine $(bindir)/wine
268 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
270 uninstall_emu: uninstall_lib
271 $(RM) $(bindir)/wine $(bindir)/dosmod
274 [ -d $(libdir) ] || $(MKDIR) $(libdir)
275 if [ -f wine.sym ]; then $(INSTALL_DATA) wine.sym $(libdir)/wine.sym; fi
276 if [ $(LIB_TARGET) ]; then \
277 $(INSTALL_DATA) $(LIB_TARGET) $(libdir); \
278 if [ $(LIB_TARGET) = libwine.so.1.0 ]; then $(LDCONFIG); fi \
280 [ -d $(bindir) ] || $(MKDIR) $(bindir)
281 $(INSTALL_PROGRAM) windows/x11drv/wineclipsrv $(bindir)/wineclipsrv
284 cd $(libdir); $(RM) $(LIB_TARGET) libwine.a libwine.so wine.sym
286 $(X11OBJS) $(EMUOBJS) $(LIBOBJS): $(TOOLSUBDIRS) dummy
287 @cd `dirname $@`; $(SUBMAKE)
289 $(BUILDSUBDIRS): dummy
292 $(LIBLINTS) $(X11LINTS) $(EMULINTS): dummy
293 @echo $@ | sed 's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
296 install_programs: dummy
297 @cd programs; $(SUBMAKE) install
299 uninstall_programs: dummy
300 @cd programs; $(SUBMAKE) uninstall
303 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
306 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
309 for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
312 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
315 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
316 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
319 -$(MKDIR) $(TOPOBJDIR)/documentation/html
320 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
323 for i in $(BUILDSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
324 for i in include include/bitmaps include/wine; do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
325 $(RM) wine wine.sym libwine.a libwine.so.1.0 libwine.so TAGS .#*
328 $(RM) config.* Make.rules include/config.h documentation/wine.man documentation/wine.conf.man
329 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
331 # We depend on configure above for checks, so we better don't use this rule.
332 #configure: configure.in
335 include/config.h.in: configure.in include/acconfig.h
336 autoheader -l include