Fixed ANSI C violations.
[wine.git] / Makefile.in
blob8ca5a73baa646289af2859d9b15639b003bb3ab8
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 TOOLSUBDIRS = \
27 tools \
28 tools/wrc
30 LIBSUBDIRS = \
31 controls \
32 console \
33 dlls/advapi32 \
34 dlls/avifil32 \
35 dlls/comctl32 \
36 dlls/commdlg \
37 dlls/crtdll \
38 dlls/dciman32 \
39 dlls/imagehlp \
40 dlls/imm32 \
41 dlls/lzexpand \
42 dlls/mpr \
43 dlls/msacm \
44 dlls/msacm32 \
45 dlls/msnet32 \
46 dlls/msvideo \
47 dlls/ntdll \
48 dlls/ole32 \
49 dlls/oleaut32 \
50 dlls/olecli \
51 dlls/oledlg \
52 dlls/olesvr \
53 dlls/psapi \
54 dlls/rasapi32 \
55 dlls/shell32 \
56 dlls/sound \
57 dlls/stress \
58 dlls/tapi32 \
59 dlls/ver \
60 dlls/version \
61 dlls/win32s \
62 dlls/win87em \
63 dlls/winaspi \
64 dlls/windebug \
65 dlls/wing \
66 dlls/winspool \
67 dlls/wnaspi32 \
68 files \
69 graphics \
70 graphics/enhmetafiledrv \
71 graphics/metafiledrv \
72 graphics/psdrv \
73 graphics/ttydrv \
74 graphics/win16drv \
75 if1632 \
76 library \
77 loader \
78 loader/ne \
79 loader/dos \
80 memory \
81 misc \
82 msdos \
83 multimedia \
84 objects \
85 ole \
86 relay32 \
87 resources \
88 scheduler \
89 server \
90 win32 \
91 windows \
92 windows/ttydrv
94 X11SUBDIRS = \
95 graphics/x11drv \
96 tsx11 \
97 windows/x11drv
99 EMUSUBDIRS = \
100 debugger \
101 miscemu
103 PROGSUBDIRS = libtest programs
105 DOCSUBDIRS = documentation
107 INCSUBDIRS = include
109 # Sub-directories to run make into
110 BUILDSUBDIRS = \
111 $(TOOLSUBDIRS) \
112 $(LIBSUBDIRS) \
113 $(X11SUBDIRS) \
114 $(EMUSUBDIRS) \
115 $(PROGSUBDIRS) \
116 $(DOCSUBDIRS)
118 # Sub-directories to run make depend into
119 DEPENDSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
121 # Sub-directories to run make install into
122 INSTALLSUBDIRS = $(DOCSUBDIRS) $(INCSUBDIRS)
124 # Sub-directories to run make lint into
125 LINTSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
127 LIBOBJS = \
128 controls/controls.o \
129 console/console.o \
130 dlls/advapi32/advapi32.o \
131 dlls/avifil32/avifil32.o \
132 dlls/comctl32/comctl32.o \
133 dlls/commdlg/commdlg.o \
134 dlls/crtdll/crtdll.o \
135 dlls/dciman32/dciman32.o \
136 dlls/imagehlp/imagehlp.o \
137 dlls/imm32/imm32.o \
138 dlls/lzexpand/lzexpand.o \
139 dlls/mpr/mpr.o \
140 dlls/msacm/msacm.o \
141 dlls/msacm32/msacm32.o \
142 dlls/msnet32/msnet32.o \
143 dlls/msvideo/msvideo.o \
144 dlls/ntdll/ntdll.o \
145 dlls/ole32/ole32.o \
146 dlls/oleaut32/oleaut32.o \
147 dlls/olecli/olecli.o \
148 dlls/oledlg/oledlg.o \
149 dlls/olesvr/olesvr.o \
150 dlls/psapi/psapi.o \
151 dlls/rasapi32/rasapi32.o \
152 dlls/shell32/shell32.o \
153 dlls/sound/sound.o \
154 dlls/stress/stress.o \
155 dlls/tapi32/tapi32.o \
156 dlls/ver/ver.o \
157 dlls/version/version.o \
158 dlls/win32s/win32s.o \
159 dlls/win87em/win87em.o \
160 dlls/winaspi/winaspi.o \
161 dlls/windebug/windebug.o \
162 dlls/wing/wing.o \
163 dlls/winspool/winspool.o \
164 dlls/wnaspi32/wnaspi32.o \
165 files/files.o \
166 graphics/graphics.o \
167 graphics/enhmetafiledrv/enhmetafiledrv.o \
168 graphics/metafiledrv/metafiledrv.o \
169 graphics/psdrv/psdrv.o \
170 graphics/ttydrv/ttydrv.o \
171 graphics/win16drv/win16drv.o \
172 if1632/if1632.o \
173 loader/loader.o \
174 loader/ne/ne.o \
175 loader/dos/dos.o \
176 memory/memory.o \
177 misc/misc.o \
178 msdos/msdos.o \
179 multimedia/multimedia.o \
180 objects/objects.o \
181 ole/ole.o \
182 relay32/relay32.o \
183 resources/resources.o \
184 scheduler/scheduler.o \
185 server/server.o \
186 win32/win32.o \
187 windows/windows.o \
188 windows/ttydrv/ttydrv.o
190 X11OBJS = \
191 graphics/x11drv/x11drv.o \
192 tsx11/tsx11.o \
193 windows/x11drv/x11drv.o
195 EMUOBJS = \
196 debugger/debugger.o \
197 miscemu/miscemu.o
199 LIB_TARGET = @LIB_TARGET@
201 ALT_LINK = @ALT_LINK@
203 all: Makefile Make.rules $(MAIN_TARGET)
204 @echo "Wine build complete."
206 LIBLINTS = $(LIBOBJS:.o=.ln)
207 X11LINTS = $(X11OBJS:.o=.ln)
208 EMULINTS = $(EMUOBJS:.o=.ln)
210 lint:: llib-lwine.ln $(EMULINTS)
211 $(LINT) $(ALLLINTFLAGS) -L. -lwine $(EMULINTS)
213 @MAKE_RULES@
215 Make.rules: Make.rules.in configure
216 @echo $? is newer than 'Make.rules', please rerun ./configure!
217 @exit 1
219 install:: install_$(MAIN_TARGET)
221 uninstall:: uninstall_$(MAIN_TARGET)
223 emu: wine
225 lib: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET)
227 wine wine.sym: $(LIB_TARGET) $(EMUOBJS) $(X11OBJS) $(LIBOBJS)
228 $(CC) -o wine $(EMUOBJS) $(ALT_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
229 nm -n wine | grep -v _compiled >wine.sym
231 libwine.a: $(LIBOBJS) $(X11OBJS)
232 $(RM) $@
233 $(AR) $@ $(LIBOBJS) $(X11OBJS)
234 $(RANLIB) $@
236 llib-lwine.ln : $(LIBLINTS) $(X11LINTS)
237 $(LINT) $(ALLLINTFLAGS) -owine $(LIBLINTS) $(X11LINTS)
239 libwine.so.1.0: $(LIBOBJS) $(X11OBJS)
240 $(LDSHARED) -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS)
241 ln -sf $@ libwine.so
243 install_emu: install_lib
244 [ -d $(bindir) ] || $(MKDIR) $(bindir)
245 $(INSTALL_PROGRAM) wine $(bindir)/wine
246 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
248 uninstall_emu: uninstall_lib
249 $(RM) $(bindir)/wine $(bindir)/dosmod
251 install_lib: dummy
252 [ -d $(libdir) ] || $(MKDIR) $(libdir)
253 if [ -f wine.sym ]; then $(INSTALL_DATA) wine.sym $(libdir)/wine.sym; fi
254 if [ $(LIB_TARGET) ]; then \
255 $(INSTALL_DATA) $(LIB_TARGET) $(libdir); \
256 if [ $(LIB_TARGET) = libwine.so.1.0 ]; then $(LDCONFIG); fi \
259 uninstall_lib: dummy
260 cd $(libdir); $(RM) $(LIB_TARGET) libwine.a libwine.so wine.sym
262 $(X11OBJS) $(EMUOBJS) $(LIBOBJS): $(TOOLSUBDIRS) dummy
263 @cd `dirname $@`; $(SUBMAKE)
265 $(BUILDSUBDIRS): dummy
266 @cd $@; $(SUBMAKE)
268 $(LIBLINTS) $(X11LINTS) $(EMULINTS): dummy
269 @echo $@ | sed 's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
272 install_programs: dummy
273 @cd programs; $(SUBMAKE) install
275 uninstall_programs: dummy
276 @cd programs; $(SUBMAKE) uninstall
278 install::
279 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
281 uninstall::
282 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
284 depend:: dummy
285 for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
287 TAGS etags:
288 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
290 manpages:
291 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
292 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
294 htmlpages:
295 -$(MKDIR) $(TOPOBJDIR)/documentation/html
296 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
298 clean::
299 for i in $(BUILDSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
300 for i in include include/bitmaps include/wine; do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
301 $(RM) wine wine.sym libwine.a libwine.so.1.0 libwine.so TAGS .#*
303 distclean: clean
304 $(RM) config.* Make.rules include/config.h documentation/wine.man documentation/wine.conf.man
305 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
307 # We depend on configure above for checks, so we better don't use this rule.
308 #configure: configure.in
309 # autoconf
311 include/config.h.in: configure.in include/acconfig.h
312 autoheader -l include
314 ### Dependencies: