Release 980712
[wine/hacks.git] / Makefile.in
blobe79008c898bc50e51033641b030d2b4d6bd23d31
1 # This Makefile understands the following targets:
3 # all (default): build wine
4 # lib: build libwine
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@
17 # Directories
19 TOPSRCDIR = @top_srcdir@
20 TOPOBJDIR = .
21 SRCDIR = @srcdir@
22 VPATH = @srcdir@
23 MODULE = none
25 LIBSUBDIRS = \
26 tools \
27 tools/wrc \
28 controls \
29 files \
30 graphics \
31 graphics/metafiledrv \
32 graphics/x11drv \
33 ipc \
34 library \
35 loader \
36 loader/ne \
37 memory \
38 misc \
39 msdos \
40 multimedia \
41 objects \
42 ole \
43 relay32 \
44 resources \
45 scheduler \
46 server \
47 tsx11 \
48 win32 \
49 windows
51 EMUSUBDIRS = \
52 debugger \
53 graphics/psdrv \
54 graphics/win16drv \
55 if1632 \
56 miscemu
58 PROGSUBDIRS = libtest programs
60 DOCSUBDIRS = documentation
62 # All sub-directories
63 ALLSUBDIRS = \
64 $(LIBSUBDIRS) \
65 $(EMUSUBDIRS) \
66 $(PROGSUBDIRS) \
67 $(DOCSUBDIRS)
69 # Sub-directories to run make depend into
70 DEPENDSUBDIRS = $(LIBSUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
72 # Sub-directories to run make install into
73 INSTALLSUBDIRS = $(DOCSUBDIRS)
75 LIBOBJS = \
76 controls/controls.o \
77 files/files.o \
78 graphics/graphics.o \
79 graphics/metafiledrv/metafiledrv.o \
80 graphics/x11drv/x11drv.o \
81 ipc/ipc.o \
82 loader/loader.o \
83 loader/ne/ne.o \
84 memory/memory.o \
85 misc/misc.o \
86 msdos/msdos.o \
87 multimedia/multimedia.o \
88 objects/objects.o \
89 ole/ole.o \
90 relay32/relay32.o \
91 resources/resources.o \
92 scheduler/scheduler.o \
93 server/server.o \
94 tsx11/tsx11.o \
95 win32/win32.o \
96 windows/windows.o
98 EMUOBJS = \
99 debugger/debugger.o \
100 graphics/psdrv/psdrv.o \
101 graphics/win16drv/win16drv.o \
102 if1632/if1632.o \
103 miscemu/miscemu.o
105 LIB_TARGET = @LIB_TARGET@
107 all: $(MAIN_TARGET)
109 @MAKE_RULES@
111 install:: install_$(MAIN_TARGET)
113 emu: wine
115 lib: $(LIBSUBDIRS) $(LIB_TARGET)
117 wine wine.sym: $(LIBSUBDIRS) $(LIB_TARGET) $(EMUSUBDIRS) dummy
118 $(CC) -o wine $(EMUOBJS) $(LIB_TARGET) $(LDOPTIONS) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LIBS)
119 nm -n wine | grep -v _compiled >wine.sym
121 libwine.a: $(LIBOBJS)
122 $(RM) $@
123 $(AR) $@ $(LIBOBJS)
124 $(RANLIB) $@
126 libwine.so.1.0: $(LIBOBJS)
127 $(CC) -shared -Wl,-soname,libwine.so -o$@ $(LIBOBJS) $(LDOPTIONS) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LIBS)
129 install_emu: install_lib
130 -mkdirhier $(bindir)
131 -mkdirhier $(libdir)
132 $(INSTALL_PROGRAM) wine $(bindir)/wine
133 $(INSTALL_DATA) wine.sym $(libdir)/wine.sym
135 install_lib: install_includes
136 $(INSTALL_DATA) $(LIB_TARGET) $(libdir)
138 install_includes: dummy
139 if [ -d $(includedir) ]; then : ; else $(MKDIR) $(includedir); fi
140 cd $(TOPSRCDIR)/include; $(INSTALL_DATA) windows.h wintypes.h $(includedir)
142 $(ALLSUBDIRS): dummy
143 @cd $@; $(SUBMAKE)
145 install_programs: dummy
146 @cd programs; $(SUBMAKE) install
148 install::
149 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
151 depend:: dummy
152 for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
154 TAGS etags:
155 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
157 manpages:
158 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
159 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
161 htmlpages:
162 -$(MKDIR) $(TOPOBJDIR)/documentation/html
163 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
165 clean::
166 for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
167 for i in include; do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
168 $(RM) wine wine.sym libwine.a libwine.so.1.0 TAGS .#*
170 distclean: clean
171 $(RM) config.* Make.rules include/config.h
172 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
174 configure: configure.in
175 autoconf
177 include/config.h.in: configure.in include/acconfig.h
178 autoheader -l include
180 ### Dependencies: