Release 970914
[wine] / Makefile.in
1 # This Makefile understands the following targets:
2 #
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.
9 #
10
11 # Main target to build
12
13 MAIN_TARGET = @MAIN_TARGET@
14
15 # Directories
16
17 TOPSRCDIR = @top_srcdir@
18 TOPOBJDIR = .
19 SRCDIR    = @srcdir@
20 VPATH     = @srcdir@
21 MODULE    = none
22
23 COMMONSUBDIRS = \
24         rc \
25         controls \
26         files \
27         graphics \
28         graphics/metafiledrv \
29         graphics/x11drv \
30         ipc \
31         loader \
32         memory \
33         misc \
34         msdos \
35         multimedia \
36         objects \
37         resources \
38         scheduler \
39         win32 \
40         windows
41
42 EMUSUBDIRS = \
43         tools \
44         debugger \
45         graphics/win16drv \
46         if1632 \
47         miscemu
48
49 LIBSUBDIRS = library
50
51 PROGSUBDIRS = libtest programs
52
53 DOCSUBDIRS = documentation
54
55 # All sub-directories
56 ALLSUBDIRS = \
57         $(COMMONSUBDIRS) \
58         $(EMUSUBDIRS) \
59         $(LIBSUBDIRS) \
60         $(PROGSUBDIRS) \
61         $(DOCSUBDIRS)
62
63 # Sub-directories to run make depend into
64 DEPENDSUBDIRS = $(COMMONSUBDIRS) $(LIBSUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
65
66 # Sub-directories to run make install into
67 INSTALLSUBDIRS = $(DOCSUBDIRS)
68
69 COMMONOBJS = \
70         controls/controls.o \
71         files/files.o \
72         graphics/graphics.o \
73         graphics/metafiledrv/metafiledrv.o \
74         graphics/x11drv/x11drv.o \
75         ipc/ipc.o \
76         loader/loader.o \
77         memory/memory.o \
78         misc/misc.o \
79         msdos/msdos.o \
80         multimedia/multimedia.o \
81         objects/objects.o \
82         resources/resources.o \
83         scheduler/scheduler.o \
84         win32/win32.o \
85         windows/windows.o
86
87 EMUOBJS = \
88         debugger/debugger.o \
89         graphics/win16drv/win16drv.o \
90         if1632/if1632.o \
91         miscemu/miscemu.o
92
93 LIBOBJS = library/library.o
94
95 all: $(MAIN_TARGET)
96
97 @MAKE_RULES@
98
99 install:: install_$(MAIN_TARGET)
100
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
104
105 install_wine: dummy
106         $(INSTALL_PROGRAM) wine $(bindir)/wine
107
108 libwine.a: $(COMMONSUBDIRS) $(LIBSUBDIRS) dummy
109         $(RM) $@
110         $(AR) $@ $(COMMONOBJS) $(LIBOBJS)
111         $(RANLIB) $@
112
113 install_libwine.a: install_includes
114         $(INSTALL_DATA) libwine.a $(libdir)
115
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)
118
119 install_libwine.so.1.0: install_includes
120         $(INSTALL_DATA) libwine.so.1.0 $(libdir)
121
122 install_includes: dummy
123         if [ -d $(includedir) ]; then : ; else $(MKDIR) $(includedir); fi 
124         cd include; $(INSTALL_DATA) windows.h wintypes.h $(includedir)
125
126 $(ALLSUBDIRS): dummy
127         @cd $@; $(SUBMAKE)
128
129 install_programs: dummy
130         @cd programs; $(SUBMAKE) install
131
132 install::
133         for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
134
135 depend:: dummy
136         for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
137
138 TAGS etags:
139         etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
140
141 clean::
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
145
146 distclean: clean
147         $(RM) config.* Make.rules include/config.h
148         $(RM) `find . \( -name Makefile -o -size 0 \) -print`
149
150 configure: configure.in
151         autoconf
152
153 include/config.h.in: configure.in include/acconfig.h
154         autoheader -l include
155
156 ### Dependencies: