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@
79 graphics
/enhmetafiledrv \
80 graphics
/metafiledrv \
111 PROGSUBDIRS
= libtest programs
113 DOCSUBDIRS
= documentation
117 # Sub-directories to run make into
126 # Sub-directories to run make depend into
127 DEPENDSUBDIRS
= $(LIBSUBDIRS
) $(X11SUBDIRS
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
129 # Sub-directories to run make install into
130 INSTALLSUBDIRS
= $(DOCSUBDIRS
) $(INCSUBDIRS
)
132 # Sub-directories to run make lint into
133 LINTSUBDIRS
= $(LIBSUBDIRS
) $(X11SUBDIRS
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
136 controls
/controls.o \
138 dlls
/advapi32
/advapi32.o \
139 dlls
/avifil32
/avifil32.o \
140 dlls
/comctl32
/comctl32.o \
141 dlls
/commdlg
/commdlg.o \
142 dlls
/crtdll
/crtdll.o \
143 dlls
/dciman32
/dciman32.o \
144 dlls
/dplayx
/dplayx.o \
145 dlls
/dsound
/dsound.o \
146 dlls
/imagehlp
/imagehlp.o \
148 dlls
/lzexpand
/lzexpand.o \
151 dlls
/msacm32
/msacm32.o \
152 dlls
/msnet32
/msnet32.o \
153 dlls
/msvideo
/msvideo.o \
156 dlls
/oleaut32
/oleaut32.o \
157 dlls
/olecli
/olecli.o \
158 dlls
/oledlg
/oledlg.o \
159 dlls
/olesvr
/olesvr.o \
161 dlls
/rasapi32
/rasapi32.o \
162 dlls
/shell32
/shell32.o \
164 dlls
/stress
/stress.o \
165 dlls
/tapi32
/tapi32.o \
167 dlls
/version
/version.o \
168 dlls
/win32s
/win32s.o \
169 dlls
/win87em
/win87em.o \
170 dlls
/winaspi
/winaspi.o \
171 dlls
/windebug
/windebug.o \
173 dlls
/winmm
/mcianim
/mcianim.drv.o \
174 dlls
/winmm
/mciavi
/mciavi.drv.o \
175 dlls
/winmm
/mcicda
/mcicda.drv.o \
176 dlls
/winmm
/mciseq
/mciseq.drv.o \
177 dlls
/winmm
/mciwave
/mciwave.drv.o \
178 dlls
/winmm
/wineoss
/wineoss.o \
180 dlls
/winspool
/winspool.o \
181 dlls
/wnaspi32
/wnaspi32.o \
183 graphics
/graphics.o \
184 graphics
/enhmetafiledrv
/enhmetafiledrv.o \
185 graphics
/metafiledrv
/metafiledrv.o \
186 graphics
/psdrv
/psdrv.o \
187 graphics
/ttydrv
/ttydrv.o \
188 graphics
/win16drv
/win16drv.o \
199 resources
/resources.o \
200 scheduler
/scheduler.o \
204 windows
/ttydrv
/ttydrv.o
207 graphics
/x11drv
/x11drv.o \
209 windows
/x11drv
/x11drv.o
212 debugger
/debugger.o \
215 LIB_TARGET
= @LIB_TARGET@
217 ALT_LINK
= @ALT_LINK@
219 all: Makefile Make.rules
$(MAIN_TARGET
)
220 @echo
"Wine build complete."
222 LIBLINTS
= $(LIBOBJS
:.o
=.ln
)
223 X11LINTS
= $(X11OBJS
:.o
=.ln
)
224 EMULINTS
= $(EMUOBJS
:.o
=.ln
)
226 lint
:: llib-lwine.ln
$(EMULINTS
)
227 $(LINT
) $(ALLLINTFLAGS
) -L.
-lwine
$(EMULINTS
)
229 WINAPI_CHECK_EXTRA_FLAGS
= --global
233 Make.rules
: Make.rules.in configure
234 @echo
$? is newer than
'Make.rules', please rerun .
/configure
!
237 install:: install_
$(MAIN_TARGET
)
239 uninstall:: uninstall_
$(MAIN_TARGET
)
243 lib
: $(LIBSUBDIRS
) $(X11SUBDIRS
) $(LIB_TARGET
)
245 wine wine.sym
: $(LIB_TARGET
) $(EMUOBJS
) $(X11OBJS
) $(LIBOBJS
)
246 $(CC
) -o wine
$(EMUOBJS
) $(ALT_LINK
) $(LDOPTIONS
) $(X_LIBS
) $(XLIB
) $(LIBS
)
247 nm
-n wine | grep
-v _compiled
>wine.sym
249 libwine.a
: $(LIBOBJS
) $(X11OBJS
)
251 $(AR
) $@
$(LIBOBJS
) $(X11OBJS
)
254 llib-lwine.ln
: $(LIBLINTS
) $(X11LINTS
)
255 $(LINT
) $(ALLLINTFLAGS
) -owine
$(LIBLINTS
) $(X11LINTS
)
257 libwine.so
.1.0: $(LIBOBJS
) $(X11OBJS
)
258 $(LDSHARED
) -o
$@
$(LIBOBJS
) $(X11OBJS
) $(LDOPTIONS
)
261 install_emu
: install_lib
262 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
263 $(INSTALL_PROGRAM
) wine
$(bindir)/wine
264 $(INSTALL_PROGRAM
) loader
/dos
/dosmod
$(bindir)/dosmod
266 uninstall_emu
: uninstall_lib
267 $(RM
) $(bindir)/wine
$(bindir)/dosmod
270 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
271 if
[ -f wine.sym
]; then
$(INSTALL_DATA
) wine.sym
$(libdir)/wine.sym
; fi
272 if
[ $(LIB_TARGET
) ]; then \
273 $(INSTALL_DATA
) $(LIB_TARGET
) $(libdir); \
274 if
[ $(LIB_TARGET
) = libwine.so
.1.0 ]; then
$(LDCONFIG
); fi \
276 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
277 $(INSTALL_PROGRAM
) windows
/x11drv
/wineclipsrv
$(bindir)/wineclipsrv
280 cd
$(libdir); $(RM
) $(LIB_TARGET
) libwine.a libwine.so wine.sym
282 $(X11OBJS
) $(EMUOBJS
) $(LIBOBJS
): $(TOOLSUBDIRS
) dummy
283 @cd
`dirname $@`; $(SUBMAKE
)
285 $(BUILDSUBDIRS
): dummy
288 $(LIBLINTS
) $(X11LINTS
) $(EMULINTS
): dummy
289 @echo
$@ | sed
's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
292 install_programs
: dummy
293 @cd programs
; $(SUBMAKE
) install
295 uninstall_programs
: dummy
296 @cd programs
; $(SUBMAKE
) uninstall
299 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) install) || exit
1; done
302 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) uninstall) || exit
1; done
305 for i in
$(DEPENDSUBDIRS
); do
(cd
$$i && $(MAKE
) depend
) || exit
1; done
308 etags
`find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
311 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/man3w
312 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) man
); done
315 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/html
316 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) html
); done
319 for i in
$(BUILDSUBDIRS
); do
(cd
$$i; $(MAKE
) clean) || exit
1; done
320 for i in
include include/bitmaps
include/wine
; do
(cd
$$i; $(RM
) *.o \
#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
321 $(RM
) wine wine.sym libwine.a libwine.so
.1.0 libwine.so TAGS .
#*
324 $(RM
) config.
* Make.rules
include/config.h documentation
/wine.man documentation
/wine.conf.man
325 $(RM
) `find . \( -name Makefile -o -size 0 \) -print`
327 # We depend on configure above for checks, so we better don't use this rule.
328 #configure: configure.in
331 include/config.h.in
: configure.in
include/acconfig.h
332 autoheader
-l
include