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 # depend: create the dependencies
8 # etags: create a TAGS file for Emacs.
11 # Main target to build
13 MAIN_TARGET = @MAIN_TARGET@
17 TOPSRCDIR = @top_srcdir@
28 graphics/metafiledrv \
51 PROGSUBDIRS = libtest programs
53 DOCSUBDIRS = documentation
63 # Sub-directories to run make depend into
64 DEPENDSUBDIRS = $(COMMONSUBDIRS) $(LIBSUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
66 # Sub-directories to run make install into
67 INSTALLSUBDIRS = $(DOCSUBDIRS)
73 graphics/metafiledrv/metafiledrv.o \
74 graphics/x11drv/x11drv.o \
80 multimedia/multimedia.o \
82 resources/resources.o \
83 scheduler/scheduler.o \
89 graphics/win16drv/win16drv.o \
93 LIBOBJS = library/library.o
99 install:: install_$(MAIN_TARGET)
101 wine wine.sym: $(COMMONSUBDIRS) $(EMUSUBDIRS) dummy
102 $(CC) -o wine $(COMMONOBJS) $(EMUOBJS) $(LDOPTIONS) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LDLIBS)
103 nm -n wine | grep -v _compiled >wine.sym
106 $(INSTALL_PROGRAM) wine $(bindir)/wine
108 libwine.a: $(COMMONSUBDIRS) $(LIBSUBDIRS) dummy
110 $(AR) $@ $(COMMONOBJS) $(LIBOBJS)
113 install_libwine.a: install_includes
114 $(INSTALL_DATA) libwine.a $(libdir)
116 libwine.so.1.0: $(COMMONSUBDIRS) $(LIBSUBDIRS) dummy
117 $(CC) -shared -Wl,-soname,libwine.so -o$@ $(COMMONOBJS) $(LIBOBJS) $(LDOPTIONS) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LDLIBS)
119 install_libwine.so.1.0: install_includes
120 $(INSTALL_DATA) libwine.so.1.0 $(libdir)
122 install_includes: dummy
123 if [ -d $(includedir) ]; then : ; else $(MKDIR) $(includedir); fi
124 cd include; $(INSTALL_DATA) windows.h wintypes.h $(includedir)
129 install_programs: dummy
130 @cd programs; $(SUBMAKE) install
133 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
136 for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
139 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
142 for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
143 for i in include; do (cd $$i; $(RM) *.o \#*\# *~ *.bak *.orig *.rej *.flc); done
144 $(RM) wine wine.sym libwine.a libwine.so.1.0 TAGS
147 $(RM) config.* Make.rules include/config.h
148 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
150 configure: configure.in
153 include/config.h.in: configure.in include/acconfig.h
154 autoheader -l include