1 # This Makefile understands the following targets:
3 # all (default): build wine
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@
20 TOPSRCDIR
= @top_srcdir@
82 graphics
/enhmetafiledrv \
83 graphics
/metafiledrv \
114 PROGSUBDIRS
= libtest programs
116 DOCSUBDIRS
= documentation
120 # Sub-directories to run make into
129 # Sub-directories to run make depend into
130 DEPENDSUBDIRS
= $(LIBSUBDIRS
) $(X11SUBDIRS
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
132 # Sub-directories to run make install into
133 INSTALLSUBDIRS
= $(DOCSUBDIRS
) $(INCSUBDIRS
)
135 # Sub-directories to run make lint into
136 LINTSUBDIRS
= $(LIBSUBDIRS
) $(X11SUBDIRS
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
139 controls
/controls.o \
141 dlls
/advapi32
/advapi32.o \
142 dlls
/avifil32
/avifil32.o \
143 dlls
/comctl32
/comctl32.o \
144 dlls
/commdlg
/commdlg.o \
145 dlls
/crtdll
/crtdll.o \
146 dlls
/dciman32
/dciman32.o \
148 dlls
/dplayx
/dplayx.o \
149 dlls
/dsound
/dsound.o \
150 dlls
/imagehlp
/imagehlp.o \
152 dlls
/lzexpand
/lzexpand.o \
155 dlls
/msacm32
/msacm32.o \
156 dlls
/msnet32
/msnet32.o \
157 dlls
/msvideo
/msvideo.o \
160 dlls
/oleaut32
/oleaut32.o \
161 dlls
/olecli
/olecli.o \
162 dlls
/oledlg
/oledlg.o \
163 dlls
/olesvr
/olesvr.o \
165 dlls
/rasapi32
/rasapi32.o \
166 dlls
/shell32
/shell32.o \
168 dlls
/stress
/stress.o \
169 dlls
/tapi32
/tapi32.o \
171 dlls
/version
/version.o \
172 dlls
/win32s
/win32s.o \
173 dlls
/win87em
/win87em.o \
174 dlls
/winaspi
/winaspi.o \
175 dlls
/windebug
/windebug.o \
178 dlls
/winmm
/mcianim
/mcianim.drv.o \
179 dlls
/winmm
/mciavi
/mciavi.drv.o \
180 dlls
/winmm
/mcicda
/mcicda.drv.o \
181 dlls
/winmm
/mciseq
/mciseq.drv.o \
182 dlls
/winmm
/mciwave
/mciwave.drv.o \
183 dlls
/winmm
/midimap
/midimap.drv.o \
184 dlls
/winmm
/wavemap
/msacm.drv.o \
185 dlls
/winmm
/wineoss
/wineoss.o \
186 dlls
/winspool
/winspool.o \
187 dlls
/wnaspi32
/wnaspi32.o \
189 graphics
/graphics.o \
190 graphics
/enhmetafiledrv
/enhmetafiledrv.o \
191 graphics
/metafiledrv
/metafiledrv.o \
192 graphics
/psdrv
/psdrv.o \
193 graphics
/ttydrv
/ttydrv.o \
194 graphics
/win16drv
/win16drv.o \
205 resources
/resources.o \
206 scheduler
/scheduler.o \
210 windows
/ttydrv
/ttydrv.o
213 graphics
/x11drv
/x11drv.o \
215 windows
/x11drv
/x11drv.o
218 debugger
/debugger.o \
221 LIB_TARGET
= @LIB_TARGET@
223 ALT_LINK
= @ALT_LINK@
225 all: Makefile Make.rules
$(MAIN_TARGET
)
226 @echo
"Wine build complete."
228 LIBLINTS
= $(LIBOBJS
:.o
=.ln
)
229 X11LINTS
= $(X11OBJS
:.o
=.ln
)
230 EMULINTS
= $(EMUOBJS
:.o
=.ln
)
232 lint
:: llib-lwine.ln
$(EMULINTS
)
233 $(LINT
) $(ALLLINTFLAGS
) -L.
-lwine
$(EMULINTS
)
235 WINAPI_CHECK_EXTRA_FLAGS
= --global
239 Make.rules
: Make.rules.in configure
240 @echo
$? is newer than
'Make.rules', please rerun .
/configure
!
243 install:: install_
$(MAIN_TARGET
)
245 uninstall:: uninstall_
$(MAIN_TARGET
)
249 lib
: $(LIBSUBDIRS
) $(X11SUBDIRS
) $(LIB_TARGET
)
251 wine wine.sym
: $(LIB_TARGET
) $(EMUOBJS
) $(X11OBJS
) $(LIBOBJS
)
252 $(CC
) -o wine
$(EMUOBJS
) $(ALT_LINK
) $(LDOPTIONS
) $(X_LIBS
) $(XLIB
) $(LIBS
)
253 nm
-n wine | grep
-v _compiled
>wine.sym
255 libwine.a
: $(LIBOBJS
) $(X11OBJS
)
257 $(AR
) $@
$(LIBOBJS
) $(X11OBJS
)
260 llib-lwine.ln
: $(LIBLINTS
) $(X11LINTS
)
261 $(LINT
) $(ALLLINTFLAGS
) -owine
$(LIBLINTS
) $(X11LINTS
)
263 libwine.so
.1.0: $(LIBOBJS
) $(X11OBJS
)
264 $(LDSHARED
) -o
$@
$(LIBOBJS
) $(X11OBJS
) $(LDOPTIONS
)
267 install_emu
: install_lib
268 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
269 $(INSTALL_PROGRAM
) wine
$(bindir)/wine
270 $(INSTALL_PROGRAM
) loader
/dos
/dosmod
$(bindir)/dosmod
272 uninstall_emu
: uninstall_lib
273 $(RM
) $(bindir)/wine
$(bindir)/dosmod
276 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
277 if
[ -f wine.sym
]; then
$(INSTALL_DATA
) wine.sym
$(libdir)/wine.sym
; fi
278 if
[ $(LIB_TARGET
) ]; then \
279 $(INSTALL_DATA
) $(LIB_TARGET
) $(libdir); \
280 if
[ $(LIB_TARGET
) = libwine.so
.1.0 ]; then
$(LDCONFIG
); fi \
282 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
283 $(INSTALL_PROGRAM
) server
/wineserver
$(bindir)/wineserver
284 $(INSTALL_PROGRAM
) windows
/x11drv
/wineclipsrv
$(bindir)/wineclipsrv
287 cd
$(libdir) && $(RM
) $(LIB_TARGET
) libwine.a libwine.so wine.sym
288 $(RM
) $(bindir)/wineserver
$(bindir)/wineclipsrv
290 $(X11OBJS
) $(EMUOBJS
) $(LIBOBJS
): $(TOOLSUBDIRS
) dummy
291 @cd
`dirname $@`; $(SUBMAKE
)
293 $(BUILDSUBDIRS
): dummy
296 $(LIBLINTS
) $(X11LINTS
) $(EMULINTS
): dummy
297 @echo
$@ | sed
's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
300 install_programs
: dummy
301 @cd programs
; $(SUBMAKE
) install
303 uninstall_programs
: dummy
304 @cd programs
; $(SUBMAKE
) uninstall
307 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) install) || exit
1; done
310 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) uninstall) || exit
1; done
313 for i in
$(DEPENDSUBDIRS
); do
(cd
$$i && $(MAKE
) depend
) || exit
1; done
316 etags
`find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
319 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/man3w
320 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) man
); done
323 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/html
324 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) html
); done
327 for i in
$(BUILDSUBDIRS
); do
(cd
$$i; $(MAKE
) clean) || exit
1; done
328 for i in
include include/bitmaps
include/wine
; do
(cd
$$i; $(RM
) *.o \
#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
329 $(RM
) wine wine.sym libwine.a libwine.so
.1.0 libwine.so TAGS .
#*
332 $(RM
) config.
* Make.rules
include/config.h documentation
/wine.man documentation
/wine.conf.man
333 $(RM
) `find . \( -name Makefile -o -size 0 \) -print`
335 # We depend on configure above for checks, so we better don't use this rule.
336 #configure: configure.in
339 include/config.h.in
: configure.in
include/acconfig.h
340 autoheader
-l
include