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@
47 graphics/metafiledrv \
80 PROGSUBDIRS = libtest programs
82 DOCSUBDIRS = documentation
86 # Sub-directories to run make into
94 # Sub-directories to run make depend into
95 DEPENDSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
97 # Sub-directories to run make install into
98 INSTALLSUBDIRS = $(DOCSUBDIRS) $(INCSUBDIRS)
101 controls/controls.o \
103 dlls/advapi32/advapi32.o \
104 dlls/comctl32/comctl32.o \
105 dlls/commdlg/commdlg.o \
106 dlls/imagehlp/imagehlp.o \
108 dlls/msacm32/msacm32.o \
111 dlls/rasapi32/rasapi32.o \
112 dlls/shell32/shell32.o \
114 dlls/version/version.o \
115 dlls/winaspi/winaspi.o \
116 dlls/wnaspi32/wnaspi32.o \
118 graphics/graphics.o \
119 graphics/metafiledrv/metafiledrv.o \
120 graphics/psdrv/psdrv.o \
121 graphics/ttydrv/ttydrv.o \
129 multimedia/multimedia.o \
133 resources/resources.o \
134 scheduler/scheduler.o \
138 windows/ttydrv/ttydrv.o
141 graphics/x11drv/x11drv.o \
143 windows/x11drv/x11drv.o
146 debugger/debugger.o \
147 graphics/win16drv/win16drv.o \
151 LIB_TARGET = @LIB_TARGET@
153 ALT_LINK = @ALT_LINK@
155 all: Makefile Make.rules $(MAIN_TARGET)
159 Make.rules: Make.rules.in configure
160 @echo $? is newer than 'Make.rules', please rerun ./configure!
163 install:: install_$(MAIN_TARGET)
165 uninstall:: uninstall_$(MAIN_TARGET)
169 lib: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET)
171 wine wine.sym: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET) $(EMUSUBDIRS) dummy
172 $(CC) -o wine $(EMUOBJS) $(ALT_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
173 nm -n wine | grep -v _compiled >wine.sym
174 @echo "Wine build complete."
176 libwine.a: $(LIBOBJS) $(X11OBJS)
178 $(AR) $@ $(LIBOBJS) $(X11OBJS)
181 libwine.so.1.0: $(LIBOBJS) $(X11OBJS)
182 $(LDSHARED) -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS)
185 install_emu: install_lib
186 [ -d $(bindir) ] || $(MKDIR) $(bindir)
187 $(INSTALL_PROGRAM) wine $(bindir)/wine
188 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
190 uninstall_emu: uninstall_lib
191 $(RM) $(bindir)/wine $(bindir)/dosmod
194 [ -d $(libdir) ] || $(MKDIR) $(libdir)
195 if [ $(LIB_TARGET) ]; then $(INSTALL_DATA) $(LIB_TARGET) $(libdir); fi
196 if [ -f wine.sym ]; then $(INSTALL_DATA) wine.sym $(libdir)/wine.sym; fi
199 cd $(libdir); $(RM) $(LIB_TARGET)
200 if [ -f $(libdir)/wine.sym ]; then $(RM) $(libdir)/wine.sym; fi
202 $(BUILDSUBDIRS): dummy
205 install_programs: dummy
206 @cd programs; $(SUBMAKE) install
208 uninstall_programs: dummy
209 @cd programs; $(SUBMAKE) uninstall
212 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
215 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
218 for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
221 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
224 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
225 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
228 -$(MKDIR) $(TOPOBJDIR)/documentation/html
229 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
232 for i in $(BUILDSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
233 for i in include; do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
234 $(RM) wine wine.sym libwine.a libwine.so.1.0 libwine.so TAGS .#*
237 $(RM) config.* Make.rules include/config.h
238 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
240 # We depend on configure above for checks, so we better don't use this rule.
241 #configure: configure.in
244 include/config.h.in: configure.in include/acconfig.h
245 autoheader -l include