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
)
138 # Extra sub-directories to clean
139 CLEANSUBDIRS
= dlls
include include/bitmaps
include/wine
142 controls
/controls.o \
144 dlls
/advapi32
/advapi32.o \
145 dlls
/avifil32
/avifil32.o \
146 dlls
/comctl32
/comctl32.o \
147 dlls
/commdlg
/commdlg.o \
148 dlls
/crtdll
/crtdll.o \
149 dlls
/dciman32
/dciman32.o \
151 dlls
/dplayx
/dplayx.o \
152 dlls
/dsound
/dsound.o \
153 dlls
/imagehlp
/imagehlp.o \
155 dlls
/lzexpand
/lzexpand.o \
158 dlls
/msacm32
/msacm32.o \
159 dlls
/msnet32
/msnet32.o \
160 dlls
/msvideo
/msvideo.o \
163 dlls
/oleaut32
/oleaut32.o \
164 dlls
/olecli
/olecli.o \
165 dlls
/oledlg
/oledlg.o \
166 dlls
/olesvr
/olesvr.o \
168 dlls
/rasapi32
/rasapi32.o \
169 dlls
/shell32
/shell32.o \
171 dlls
/stress
/stress.o \
172 dlls
/tapi32
/tapi32.o \
174 dlls
/version
/version.o \
175 dlls
/win32s
/win32s.o \
176 dlls
/win87em
/win87em.o \
177 dlls
/winaspi
/winaspi.o \
178 dlls
/windebug
/windebug.o \
181 dlls
/winmm
/mcianim
/mcianim.drv.o \
182 dlls
/winmm
/mciavi
/mciavi.drv.o \
183 dlls
/winmm
/mcicda
/mcicda.drv.o \
184 dlls
/winmm
/mciseq
/mciseq.drv.o \
185 dlls
/winmm
/mciwave
/mciwave.drv.o \
186 dlls
/winmm
/midimap
/midimap.drv.o \
187 dlls
/winmm
/wavemap
/msacm.drv.o \
188 dlls
/winmm
/wineoss
/wineoss.o \
189 dlls
/winspool
/winspool.o \
190 dlls
/wnaspi32
/wnaspi32.o \
192 graphics
/graphics.o \
193 graphics
/enhmetafiledrv
/enhmetafiledrv.o \
194 graphics
/metafiledrv
/metafiledrv.o \
195 graphics
/psdrv
/psdrv.o \
196 graphics
/ttydrv
/ttydrv.o \
197 graphics
/win16drv
/win16drv.o \
208 resources
/resources.o \
209 scheduler
/scheduler.o \
213 windows
/ttydrv
/ttydrv.o
216 graphics
/x11drv
/x11drv.o \
218 windows
/x11drv
/x11drv.o
221 debugger
/debugger.o \
224 LIB_TARGET
= @LIB_TARGET@
226 ALT_LINK
= @ALT_LINK@
228 all: Makefile Make.rules
$(MAIN_TARGET
)
229 @echo
"Wine build complete."
231 LIBLINTS
= $(LIBOBJS
:.o
=.ln
)
232 X11LINTS
= $(X11OBJS
:.o
=.ln
)
233 EMULINTS
= $(EMUOBJS
:.o
=.ln
)
235 lint
:: llib-lwine.ln
$(EMULINTS
)
236 $(LINT
) $(ALLLINTFLAGS
) -L.
-lwine
$(EMULINTS
)
238 WINAPI_CHECK_EXTRA_FLAGS
= --global
242 Make.rules
: Make.rules.in configure
243 @echo
$? is newer than
'Make.rules', please rerun .
/configure
!
246 install:: install_
$(MAIN_TARGET
)
248 uninstall:: uninstall_
$(MAIN_TARGET
)
252 lib
: $(LIBSUBDIRS
) $(X11SUBDIRS
) $(LIB_TARGET
)
254 wine wine.sym
: $(LIB_TARGET
) $(EMUOBJS
) $(X11OBJS
) $(LIBOBJS
)
255 $(CC
) -o wine
$(EMUOBJS
) $(ALT_LINK
) $(LDOPTIONS
) $(X_LIBS
) $(XLIB
) $(LIBS
)
256 nm
-n wine | grep
-v _compiled
>wine.sym
258 libwine.a
: $(LIBOBJS
) $(X11OBJS
)
260 $(AR
) $@
$(LIBOBJS
) $(X11OBJS
)
263 llib-lwine.ln
: $(LIBLINTS
) $(X11LINTS
)
264 $(LINT
) $(ALLLINTFLAGS
) -owine
$(LIBLINTS
) $(X11LINTS
)
266 libwine.so
.1.0: $(LIBOBJS
) $(X11OBJS
)
267 $(LDSHARED
) -o
$@
$(LIBOBJS
) $(X11OBJS
) $(LDOPTIONS
)
270 install_emu
: install_lib
271 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
272 $(INSTALL_PROGRAM
) wine
$(bindir)/wine
273 $(INSTALL_PROGRAM
) loader
/dos
/dosmod
$(bindir)/dosmod
275 uninstall_emu
: uninstall_lib
276 $(RM
) $(bindir)/wine
$(bindir)/dosmod
279 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
280 if
[ -f wine.sym
]; then
$(INSTALL_DATA
) wine.sym
$(libdir)/wine.sym
; fi
281 if
[ $(LIB_TARGET
) ]; then \
282 $(INSTALL_DATA
) $(LIB_TARGET
) $(libdir); \
283 if
[ $(LIB_TARGET
) = libwine.so
.1.0 ]; then
$(LDCONFIG
); fi \
285 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
286 $(INSTALL_PROGRAM
) server
/wineserver
$(bindir)/wineserver
287 $(INSTALL_PROGRAM
) windows
/x11drv
/wineclipsrv
$(bindir)/wineclipsrv
290 cd
$(libdir) && $(RM
) $(LIB_TARGET
) libwine.a libwine.so wine.sym
291 $(RM
) $(bindir)/wineserver
$(bindir)/wineclipsrv
293 $(X11OBJS
) $(EMUOBJS
) $(LIBOBJS
): $(TOOLSUBDIRS
) dummy
294 @cd
`dirname $@`; $(SUBMAKE
)
296 $(BUILDSUBDIRS
): dummy
299 $(LIBLINTS
) $(X11LINTS
) $(EMULINTS
): dummy
300 @echo
$@ | sed
's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
303 install_programs
: dummy
304 @cd programs
; $(SUBMAKE
) install
306 uninstall_programs
: dummy
307 @cd programs
; $(SUBMAKE
) uninstall
310 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) install) || exit
1; done
313 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) uninstall) || exit
1; done
316 for i in
$(DEPENDSUBDIRS
); do
(cd
$$i && $(MAKE
) depend
) || exit
1; done
319 etags
`find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
322 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/man3w
323 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) man
); done
326 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/html
327 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) html
); done
330 for i in
$(BUILDSUBDIRS
); do
(cd
$$i; $(MAKE
) clean) || exit
1; done
331 for i in
$(CLEANSUBDIRS
); do
(cd
$$i; $(RM
) *.o \
#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
332 $(RM
) wine wine.sym libwine.a libwine.so
.1.0 libwine.so TAGS .
#*
335 $(RM
) config.
* Make.rules
include/config.h documentation
/wine.man documentation
/wine.conf.man
336 $(RM
) `find . \( -name Makefile -o -size 0 \) -print`
338 # We depend on configure above for checks, so we better don't use this rule.
339 #configure: configure.in
342 include/config.h.in
: configure.in
include/acconfig.h
343 autoheader
-l
include