Cosmetics.
[wine.git] / Makefile.in
blobd1a00e49079db25d483256b79a9f1a3e64258e58
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 # uninstall: uninstall everything
9 # depend: create the dependencies
10 # etags: create a TAGS file for Emacs.
11 # manpages: compile manpages for Wine API
14 # Main target to build
16 MAIN_TARGET = @MAIN_TARGET@
18 # Directories
20 TOPSRCDIR = @top_srcdir@
21 TOPOBJDIR = .
22 SRCDIR = @srcdir@
23 VPATH = @srcdir@
24 MODULE = none
26 LIBSUBDIRS = \
27 tools \
28 tools/wrc \
29 controls \
30 console \
31 dlls/advapi32 \
32 dlls/avifil32 \
33 dlls/comctl32 \
34 dlls/commdlg \
35 dlls/imagehlp \
36 dlls/msacm \
37 dlls/msacm32 \
38 dlls/ntdll \
39 dlls/psapi \
40 dlls/rasapi32 \
41 dlls/shell32 \
42 dlls/tapi32 \
43 dlls/ver \
44 dlls/version \
45 dlls/winaspi \
46 dlls/wnaspi32 \
47 files \
48 graphics \
49 graphics/metafiledrv \
50 graphics/psdrv \
51 graphics/ttydrv \
52 ipc \
53 library \
54 loader \
55 loader/ne \
56 loader/dos \
57 memory \
58 misc \
59 msdos \
60 multimedia \
61 objects \
62 ole \
63 relay32 \
64 resources \
65 scheduler \
66 server \
67 win32 \
68 windows \
69 windows/ttydrv
71 X11SUBDIRS = \
72 graphics/x11drv \
73 tsx11 \
74 windows/x11drv
76 EMUSUBDIRS = \
77 debugger \
78 graphics/win16drv \
79 if1632 \
80 miscemu
82 PROGSUBDIRS = libtest programs
84 DOCSUBDIRS = documentation
86 INCSUBDIRS = include
88 # Sub-directories to run make into
89 BUILDSUBDIRS = \
90 $(LIBSUBDIRS) \
91 $(X11SUBDIRS) \
92 $(EMUSUBDIRS) \
93 $(PROGSUBDIRS) \
94 $(DOCSUBDIRS)
96 # Sub-directories to run make depend into
97 DEPENDSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
99 # Sub-directories to run make install into
100 INSTALLSUBDIRS = $(DOCSUBDIRS) $(INCSUBDIRS)
102 LIBOBJS = \
103 controls/controls.o \
104 console/console.o \
105 dlls/advapi32/advapi32.o \
106 dlls/avifil32/avifil32.o \
107 dlls/comctl32/comctl32.o \
108 dlls/commdlg/commdlg.o \
109 dlls/imagehlp/imagehlp.o \
110 dlls/msacm/msacm.o \
111 dlls/msacm32/msacm32.o \
112 dlls/ntdll/ntdll.o \
113 dlls/psapi/psapi.o \
114 dlls/rasapi32/rasapi32.o \
115 dlls/shell32/shell32.o \
116 dlls/tapi32/tapi32.o \
117 dlls/ver/ver.o \
118 dlls/version/version.o \
119 dlls/winaspi/winaspi.o \
120 dlls/wnaspi32/wnaspi32.o \
121 files/files.o \
122 graphics/graphics.o \
123 graphics/metafiledrv/metafiledrv.o \
124 graphics/psdrv/psdrv.o \
125 graphics/ttydrv/ttydrv.o \
126 ipc/ipc.o \
127 loader/loader.o \
128 loader/ne/ne.o \
129 loader/dos/dos.o \
130 memory/memory.o \
131 misc/misc.o \
132 msdos/msdos.o \
133 multimedia/multimedia.o \
134 objects/objects.o \
135 ole/ole.o \
136 relay32/relay32.o \
137 resources/resources.o \
138 scheduler/scheduler.o \
139 server/server.o \
140 win32/win32.o \
141 windows/windows.o \
142 windows/ttydrv/ttydrv.o
144 X11OBJS = \
145 graphics/x11drv/x11drv.o \
146 tsx11/tsx11.o \
147 windows/x11drv/x11drv.o
149 EMUOBJS = \
150 debugger/debugger.o \
151 graphics/win16drv/win16drv.o \
152 if1632/if1632.o \
153 miscemu/miscemu.o
155 LIB_TARGET = @LIB_TARGET@
157 ALT_LINK = @ALT_LINK@
159 all: Makefile Make.rules $(MAIN_TARGET)
161 @MAKE_RULES@
163 Make.rules: Make.rules.in configure
164 @echo $? is newer than 'Make.rules', please rerun ./configure!
165 @exit 1
167 install:: install_$(MAIN_TARGET)
169 uninstall:: uninstall_$(MAIN_TARGET)
171 emu: wine
173 lib: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET)
175 wine wine.sym: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET) $(EMUSUBDIRS) dummy
176 $(CC) -o wine $(EMUOBJS) $(ALT_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
177 nm -n wine | grep -v _compiled >wine.sym
178 @echo "Wine build complete."
180 libwine.a: $(LIBOBJS) $(X11OBJS)
181 $(RM) $@
182 $(AR) $@ $(LIBOBJS) $(X11OBJS)
183 $(RANLIB) $@
185 libwine.so.1.0: $(LIBOBJS) $(X11OBJS)
186 $(LDSHARED) -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS)
187 ln -sf $@ libwine.so
189 install_emu: install_lib
190 [ -d $(bindir) ] || $(MKDIR) $(bindir)
191 $(INSTALL_PROGRAM) wine $(bindir)/wine
192 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
194 uninstall_emu: uninstall_lib
195 $(RM) $(bindir)/wine $(bindir)/dosmod
197 install_lib: dummy
198 [ -d $(libdir) ] || $(MKDIR) $(libdir)
199 if [ $(LIB_TARGET) ]; then $(INSTALL_DATA) $(LIB_TARGET) $(libdir); fi
200 if [ -f wine.sym ]; then $(INSTALL_DATA) wine.sym $(libdir)/wine.sym; fi
202 uninstall_lib: dummy
203 cd $(libdir); $(RM) $(LIB_TARGET)
204 if [ -f $(libdir)/wine.sym ]; then $(RM) $(libdir)/wine.sym; fi
206 $(BUILDSUBDIRS): dummy
207 @cd $@; $(SUBMAKE)
209 install_programs: dummy
210 @cd programs; $(SUBMAKE) install
212 uninstall_programs: dummy
213 @cd programs; $(SUBMAKE) uninstall
215 install::
216 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
218 uninstall::
219 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
221 depend:: dummy
222 for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
224 TAGS etags:
225 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
227 manpages:
228 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
229 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
231 htmlpages:
232 -$(MKDIR) $(TOPOBJDIR)/documentation/html
233 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
235 clean::
236 for i in $(BUILDSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
237 for i in include include/wine; do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
238 $(RM) wine wine.sym libwine.a libwine.so.1.0 libwine.so TAGS .#*
240 distclean: clean
241 $(RM) config.* Make.rules include/config.h
242 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
244 # We depend on configure above for checks, so we better don't use this rule.
245 #configure: configure.in
246 # autoconf
248 include/config.h.in: configure.in include/acconfig.h
249 autoheader -l include
251 ### Dependencies: