| # This Makefile understands the following targets: | |
| # | |
| # all (default): build wine | |
| # clean: remove all intermediate files | |
| # distclean: also remove all files created by configure | |
| # install: install everything | |
| # uninstall: uninstall everything | |
| # depend: create the dependencies | |
| # etags: create a TAGS file for Emacs. | |
| # manpages: compile manpages for Wine API | |
| # | |
| # Directories | |
| TOPSRCDIR = @top_srcdir@ | |
| TOPOBJDIR = . | |
| SRCDIR = @srcdir@ | |
| VPATH = @srcdir@ | |
| LIBEXT = @LIBEXT@ | |
| MODULE = wine | |
| SOVERSION = 1.0 | |
| TOOLSUBDIRS = \ | |
| tools \ | |
| tools/wrc | |
| LIBSUBDIRS = \ | |
| controls \ | |
| console \ | |
| debugger \ | |
| dlls/advapi32 \ | |
| dlls/crtdll \ | |
| dlls/display \ | |
| dlls/mouse \ | |
| dlls/mpr \ | |
| dlls/ntdll \ | |
| dlls/winaspi \ | |
| files \ | |
| graphics \ | |
| graphics/enhmetafiledrv \ | |
| graphics/metafiledrv \ | |
| graphics/psdrv \ | |
| graphics/ttydrv \ | |
| graphics/win16drv \ | |
| if1632 \ | |
| library \ | |
| loader \ | |
| loader/ne \ | |
| loader/dos \ | |
| memory \ | |
| misc \ | |
| msdos \ | |
| objects \ | |
| ole \ | |
| relay32 \ | |
| resources \ | |
| scheduler \ | |
| win32 \ | |
| windows \ | |
| windows/ttydrv | |
| X11SUBDIRS = \ | |
| graphics/x11drv \ | |
| tsx11 \ | |
| windows/x11drv | |
| EMUSUBDIRS = \ | |
| miscemu \ | |
| server | |
| PROGSUBDIRS = libtest programs | |
| DOCSUBDIRS = documentation | |
| INCSUBDIRS = include | |
| PROGRAMS = \ | |
| loader/dos/dosmod \ | |
| server/wineserver \ | |
| windows/x11drv/wineclipsrv | |
| # Sub-directories to run make into | |
| BUILDSUBDIRS = \ | |
| $(TOOLSUBDIRS) \ | |
| $(LIBSUBDIRS) \ | |
| $(X11SUBDIRS) \ | |
| $(DLLDIR) \ | |
| $(EMUSUBDIRS) \ | |
| $(PROGSUBDIRS) \ | |
| $(DOCSUBDIRS) | |
| # Sub-directories to run make depend into | |
| DEPENDSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(DLLDIR) $(EMUSUBDIRS) $(DOCSUBDIRS) | |
| # Sub-directories to run make install into | |
| INSTALLSUBDIRS = $(DLLDIR) $(DOCSUBDIRS) $(INCSUBDIRS) | |
| # Sub-directories to run make lint into | |
| LINTSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(DLLDIR) $(EMUSUBDIRS) $(DOCSUBDIRS) | |
| # Extra sub-directories to clean | |
| CLEANSUBDIRS = dlls include include/bitmaps include/wine | |
| LIBOBJS = \ | |
| controls/controls.o \ | |
| console/console.o \ | |
| debugger/debugger.o \ | |
| dlls/advapi32/advapi32.o \ | |
| dlls/crtdll/crtdll.o \ | |
| dlls/display/display.o \ | |
| dlls/mouse/mouse.o \ | |
| dlls/mpr/mpr.o \ | |
| dlls/ntdll/ntdll.o \ | |
| dlls/winaspi/winaspi.o \ | |
| files/files.o \ | |
| graphics/graphics.o \ | |
| graphics/enhmetafiledrv/enhmetafiledrv.o \ | |
| graphics/metafiledrv/metafiledrv.o \ | |
| graphics/psdrv/psdrv.o \ | |
| graphics/ttydrv/ttydrv.o \ | |
| graphics/win16drv/win16drv.o \ | |
| if1632/if1632.o \ | |
| loader/loader.o \ | |
| loader/ne/ne.o \ | |
| loader/dos/dos.o \ | |
| memory/memory.o \ | |
| misc/misc.o \ | |
| msdos/msdos.o \ | |
| objects/objects.o \ | |
| ole/ole.o \ | |
| relay32/relay32.o \ | |
| resources/resources.o \ | |
| scheduler/scheduler.o \ | |
| win32/win32.o \ | |
| windows/windows.o \ | |
| windows/ttydrv/ttydrv.o | |
| X11OBJS = \ | |
| graphics/x11drv/x11drv.o \ | |
| tsx11/tsx11.o \ | |
| windows/x11drv/x11drv.o | |
| EMUOBJS = \ | |
| miscemu/miscemu.o | |
| DLLOBJS = $(DLLS:%=dlls/lib%.@LIBEXT@) | |
| EXTRA_OBJS = $(LIBOBJS) $(X11OBJS) | |
| EMU_TARGET = @EMU_TARGET@ | |
| all: Make.rules $(PROGRAMS) $(EMU_TARGET) | |
| @echo "Wine build complete." | |
| LIBLINTS = $(LIBOBJS:.o=.ln) | |
| X11LINTS = $(X11OBJS:.o=.ln) | |
| EMULINTS = $(EMUOBJS:.o=.ln) | |
| lint:: llib-lwine.ln $(EMULINTS) | |
| $(LINT) $(ALLLINTFLAGS) -L. -lwine $(EMULINTS) | |
| WINAPI_CHECK_EXTRA_FLAGS = --global | |
| @MAKE_RULES@ | |
| all: lib$(MODULE).$(LIBEXT) $(DLLOBJS) | |
| Make.rules: Make.rules.in configure | |
| @echo $? is newer than 'Make.rules', please rerun ./configure! | |
| @exit 1 | |
| wine wine.sym: lib$(MODULE).$(LIBEXT) $(DLLOBJS) $(EMUOBJS) | |
| $(CC) -o wine $(EMUOBJS) $(DLL_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS) | |
| nm -n wine | grep -v _compiled >wine.sym | |
| llib-lwine.ln : $(LIBLINTS) $(X11LINTS) | |
| $(LINT) $(ALLLINTFLAGS) -owine $(LIBLINTS) $(X11LINTS) | |
| install_wine: wine | |
| [ -d $(bindir) ] || $(MKDIR) $(bindir) | |
| [ -d $(libdir) ] || $(MKDIR) $(libdir) | |
| [ -f wine.sym ] && $(INSTALL_DATA) wine.sym $(libdir)/wine.sym | |
| $(INSTALL_PROGRAM) wine $(bindir)/wine | |
| install:: $(PROGRAMS) $(EMU_TARGET:%=install_%) | |
| [ -d $(bindir) ] || $(MKDIR) $(bindir) | |
| $(INSTALL_PROGRAM) server/wineserver $(bindir)/wineserver | |
| $(INSTALL_PROGRAM) windows/x11drv/wineclipsrv $(bindir)/wineclipsrv | |
| $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod | |
| uninstall:: | |
| cd $(libdir) && $(RM) libwine.a libwine.so libwine.so.$(SOVERSION) wine.sym | |
| cd $(bindir) && $(RM) wine wineserver wineclipsrv dosmod | |
| $(X11OBJS) $(EMUOBJS) $(LIBOBJS) $(DLLOBJS) $(PROGRAMS): $(TOOLSUBDIRS) dummy | |
| @cd `dirname $@` && $(MAKE) `basename $@` | |
| $(BUILDSUBDIRS): dummy | |
| @cd $@ && $(MAKE) | |
| $(LIBLINTS) $(X11LINTS) $(EMULINTS): dummy | |
| @echo $@ | sed 's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh | |
| install_programs: dummy | |
| @cd programs && $(MAKE) install | |
| uninstall_programs: dummy | |
| @cd programs && $(MAKE) uninstall | |
| install:: | |
| for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done | |
| -$(LDCONFIG) | |
| uninstall:: | |
| for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done | |
| depend:: | |
| for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done | |
| checklink:: | |
| @cd dlls && $(MAKE) checklink | |
| TAGS etags: | |
| etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain` | |
| manpages: | |
| -$(MKDIR) $(TOPOBJDIR)/documentation/man3w | |
| for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done | |
| htmlpages: | |
| -$(MKDIR) $(TOPOBJDIR)/documentation/html | |
| for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done | |
| clean:: | |
| for i in $(BUILDSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done | |
| for i in $(CLEANSUBDIRS); do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done | |
| $(RM) wine wine.sym libwine.so.1.0 TAGS .#* | |
| distclean: clean | |
| $(RM) config.* Make.rules include/config.h documentation/wine.man documentation/wine.conf.man | |
| $(RM) `find . \( -name Makefile -o -size 0 \) -print` | |
| # We depend on configure above for checks, so we better don't use this rule. | |
| #configure: configure.in | |
| # autoconf | |
| include/config.h.in: configure.in include/acconfig.h | |
| autoheader -l include | |
| ### Dependencies: |