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 # depend: create the dependencies
9 # etags: create a TAGS file for Emacs.
10 # manpages: compile manpages for Wine API
13 # Main target to build
15 MAIN_TARGET = @MAIN_TARGET@
16 LIB_TARGET = @LIB_TARGET@
20 TOPSRCDIR = @top_srcdir@
32 graphics/metafiledrv \
56 PROGSUBDIRS = libtest programs
58 DOCSUBDIRS = documentation
67 # Sub-directories to run make depend into
68 DEPENDSUBDIRS = $(LIBSUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
70 # Sub-directories to run make install into
71 INSTALLSUBDIRS = $(DOCSUBDIRS)
77 graphics/metafiledrv/metafiledrv.o \
78 graphics/x11drv/x11drv.o \
84 multimedia/multimedia.o \
88 resources/resources.o \
89 scheduler/scheduler.o \
96 graphics/win16drv/win16drv.o \
104 install:: install_$(MAIN_TARGET)
108 lib: $(LIBSUBDIRS) $(LIB_TARGET)
110 wine wine.sym: $(LIBSUBDIRS) $(LIB_TARGET) $(EMUSUBDIRS) dummy
111 $(CC) -o wine $(EMUOBJS) $(LIB_TARGET) $(LDOPTIONS) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LIBS)
112 nm -n wine | grep -v _compiled >wine.sym
114 libwine.a: $(LIBOBJS)
119 libwine.so.1.0: $(LIBOBJS)
120 $(CC) -shared -Wl,-soname,libwine.so -o$@ $(LIBOBJS) $(LDOPTIONS) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LIBS)
123 $(INSTALL_PROGRAM) wine $(bindir)/wine
125 install_lib: install_includes
126 $(INSTALL_DATA) $(LIB_TARGET) $(libdir)
128 install_includes: dummy
129 if [ -d $(includedir) ]; then : ; else $(MKDIR) $(includedir); fi
130 cd include; $(INSTALL_DATA) windows.h wintypes.h $(includedir)
135 install_programs: dummy
136 @cd programs; $(SUBMAKE) install
139 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
142 for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
145 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
148 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
149 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
152 for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
153 for i in include; do (cd $$i; $(RM) *.o \#*\# *~ *.bak *.orig *.rej *.flc); done
154 $(RM) wine wine.sym libwine.a libwine.so.1.0 TAGS
157 $(RM) config.* Make.rules include/config.h
158 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
160 configure: configure.in
163 include/config.h.in: configure.in include/acconfig.h
164 autoheader -l include