1 # This Makefile understands the following targets:
3 # all (default): build wine
4 # clean: remove all intermediate files
5 # distclean: also remove all files created by configure
6 # install: install everything
7 # uninstall: uninstall everything
8 # depend: create the dependencies
9 # etags: create a TAGS file for Emacs.
10 # manpages: compile manpages for Wine API
15 TOPSRCDIR = @top_srcdir@
24 # Stand-alone programs
29 # Programs that link with libwine
33 # Libraries (not dlls) to build
35 library/libwine.$(LIBEXT) \
36 unicode/libwine_unicode.$(LIBEXT)
38 # Sub-directories to run make depend/clean into
52 # Sub-directories to run make install into
66 DLLOBJS = $(DLLS:%=dlls/lib%.@LIBEXT@)
68 all: Make.rules $(PROGRAMS) $(LIBPROGRAMS) wine
69 @echo "Wine build complete."
71 WINAPI_CHECK_EXTRA_FLAGS = --global
75 Make.rules: Make.rules.in configure
76 @echo $? is newer than 'Make.rules', please rerun ./configure!
79 wine: libwine.$(LIBEXT) libwine_unicode.$(LIBEXT) dlls $(EMUOBJS)
80 $(CC) -o wine $(EMUOBJS) $(DLL_LINK) $(LIBS) $(LDFLAGS)
82 install:: all $(INSTALLSUBDIRS:%=%/__install__)
83 [ -d $(bindir) ] || $(MKDIR) $(bindir)
84 $(INSTALL_PROGRAM) wine $(bindir)/wine
85 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
88 uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__)
89 cd $(bindir) && $(RM) wine dosmod
91 $(EMUOBJS) $(DLLOBJS) $(PROGRAMS) $(LIBPROGRAMS) $(LIBRARIES): dummy
92 @cd `dirname $@` && $(MAKE) `basename $@`
94 libwine.$(LIBEXT): library/libwine.$(LIBEXT)
95 $(RM) $@ && $(LN_S) library/libwine.$(LIBEXT) $@
97 libwine_unicode.$(LIBEXT): unicode/libwine_unicode.$(LIBEXT)
98 $(RM) $@ && $(LN_S) unicode/libwine_unicode.$(LIBEXT) $@
100 # Dependencies between directories
102 $(DLLOBJS) $(PROGRAMS): tools
104 $(EMUOBJS): tools dlls
106 $(LIBPROGRAMS): tools dlls libwine.$(LIBEXT) libwine_unicode.$(LIBEXT)
108 server tools: libwine_unicode.$(LIBEXT)
110 dlls: tools libwine.$(LIBEXT) libwine_unicode.$(LIBEXT)
113 $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c -L. -lwine -lwine_unicode $(LIBS) && $(RM) checklink
115 install_programs: dummy
116 @cd programs && $(MAKE) install
118 uninstall_programs: dummy
119 @cd programs && $(MAKE) uninstall
122 @cd dlls && $(MAKE) checklink
125 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
128 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
129 for i in $(SUBDIRS); do (cd $$i && $(MAKE) man); done
132 -$(MKDIR) $(TOPOBJDIR)/documentation/html
133 for i in $(SUBDIRS); do (cd $$i && $(MAKE) html); done
139 $(RM) config.* TAGS Make.rules dlls/Makedll.rules include/config.h documentation/wine.man documentation/wine.conf.man tools/winelauncher
140 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
142 # We depend on configure above for checks, so we better don't use this rule.
143 #configure: configure.in
146 include/config.h.in: configure.in include/acconfig.h
147 autoheader -l include