Release 960302
[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 # depend:               create the dependencies
7 # etags:                Create a TAGS file for Emacs.
8 #
9 # Author: Michael Patra   <micky@marie.physik.tu-berlin.de>
10 #                         <patra@itp1.physik.tu-berlin.de>
11
12 # First some useful definitions
13
14 CC        = @CC@
15 CPP       = @CPP@
16 CFLAGS    = @CFLAGS@
17 DEFS      = @DEFS@ -DWINE_INI_GLOBAL=\"$(WINE_INI_GLOBAL)\"
18 X_CFLAGS  = @X_CFLAGS@
19 X_LIBS    = @X_LIBS@
20 TOPSRC    = @top_srcdir@
21 DIVINCL   = -I$(TOPSRC)/include
22 XPM_LIB   = -lXpm
23 XLIB      = @X_PRE_LIBS@ -lXext -lX11 @X_EXTRA_LIBS@
24 LDLIBS    = @LDLIBS@
25 AR        = ar rc
26 RANLIB    = @RANLIB@
27 RM        = rm -f
28 SUBMAKE   = $(MAKE) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'DEFS=$(DEFS)'
29 @SET_MAKE@
30
31 # Installation infos
32
33 INSTALL         = @INSTALL@
34 INSTALL_PROGRAM = @INSTALL_PROGRAM@
35 INSTALL_DATA    = @INSTALL_DATA@
36 prefix          = @prefix@
37 exec_prefix     = @exec_prefix@
38 bindir          = @bindir@
39 libdir          = @libdir@
40 sysconfdir      = @sysconfdir@
41 mandir          = @mandir@/man1
42 manext          = .1
43 WINE_INI_GLOBAL = $(sysconfdir)/wine.conf
44
45 # Main target to build
46
47 MAIN_TARGET = @MAIN_TARGET@
48
49 COMMONSUBDIRS = \
50         rc \
51         controls \
52         files \
53         ipc \
54         loader \
55         misc \
56         multimedia \
57         objects \
58         resources \
59         win32 \
60         windows
61
62 EMUSUBDIRS = \
63         tools \
64         debugger \
65         debugger/readline \
66         if1632 \
67         memory \
68         miscemu
69
70 LIBSUBDIRS = library
71
72 PROGSUBDIRS = libtest programs
73
74 ALLSUBDIRS = $(COMMONSUBDIRS) $(EMUSUBDIRS) $(LIBSUBDIRS) $(PROGSUBDIRS)
75
76 COMMONOBJS = \
77         controls/controls.o \
78         files/files.o \
79         ipc/ipc.o \
80         loader/loader.o \
81         misc/misc.o \
82         multimedia/multimedia.o \
83         objects/objects.o \
84         resources/resources.o \
85         win32/win32.o \
86         windows/windows.o
87
88 EMUOBJS = \
89         debugger/debugger.o \
90         debugger/readline/readline.o \
91         if1632/if1632.o \
92         memory/memory.o \
93         miscemu/miscemu.o
94
95 LIBOBJS = library/library.o
96
97
98 all: $(MAIN_TARGET)
99
100 install: install_$(MAIN_TARGET)
101
102 wine wine.sym: $(COMMONSUBDIRS) $(EMUSUBDIRS) dummy
103         $(CC) -o wine $(COMMONOBJS) $(EMUOBJS) $(LDOPTIONS) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LDLIBS)
104         nm -n wine | grep -v _compiled >wine.sym
105
106 install_wine: dummy
107         $(INSTALL_PROGRAM) wine $(bindir)/wine
108         $(INSTALL_DATA) wine.man $(mandir)/wine$(manext)
109
110 libwine.a: $(COMMONSUBDIRS) $(LIBSUBDIRS) dummy
111         $(RM) $@
112         $(AR) $@ $(COMMONOBJS) $(LIBOBJS)
113         $(RANLIB) $@
114
115 install_libwine.a: dummy
116         $(INSTALL_DATA) libwine.a $(libdir)
117
118 libwine.so.1.0: $(COMMONSUBDIRS) $(LIBSUBDIRS) dummy
119         $(CC) -shared -Wl,-soname,libwine.so.1 -o$@ $(COMMONOBJS) $(LIBOBJS) $(LDOPTIONS) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LDLIBS)
120
121 install_libwine.so.1.0: dummy
122         $(INSTALL_DATA) libwine.so.1.0 $(libdir)
123
124 $(ALLSUBDIRS): dummy
125         @cd $@; $(SUBMAKE)
126
127 depend:
128         for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) depend); done
129
130 etags:
131         etags `find . -name '*.[chS]' -print`
132
133 clean:
134         for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) clean); done
135         $(RM) *.o \#*\# *~ *.bak *.orig *.rej *.flc
136         $(RM) wine wine.sym libwine.a libwine.so.1.0 TAGS
137         (cd include; $(RM) *.o \#*\# *~ *.bak *.orig *.rej *.flc)
138
139 distclean: clean
140         $(RM) config.* Make.rules
141         $(RM) `find . \( -name Makefile -o -size 0 \) -print`
142
143 dummy: