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@
85 graphics
/enhmetafiledrv \
86 graphics
/metafiledrv \
117 PROGSUBDIRS
= libtest programs
119 DOCSUBDIRS
= documentation
123 # Sub-directories to run make into
132 # Sub-directories to run make depend into
133 DEPENDSUBDIRS
= $(LIBSUBDIRS
) $(X11SUBDIRS
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
135 # Sub-directories to run make install into
136 INSTALLSUBDIRS
= $(DOCSUBDIRS
) $(INCSUBDIRS
)
138 # Sub-directories to run make lint into
139 LINTSUBDIRS
= $(LIBSUBDIRS
) $(X11SUBDIRS
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
141 # Extra sub-directories to clean
142 CLEANSUBDIRS
= dlls
include include/bitmaps
include/wine
145 controls
/controls.o \
147 dlls
/advapi32
/advapi32.o \
148 dlls
/avifil32
/avifil32.o \
149 dlls
/comctl32
/comctl32.o \
150 dlls
/commdlg
/commdlg.o \
151 dlls
/crtdll
/crtdll.o \
152 dlls
/dciman32
/dciman32.o \
153 dlls
/display
/display.o \
154 dlls
/dplayx
/dplayx.o \
155 dlls
/dsound
/dsound.o \
157 dlls
/imagehlp
/imagehlp.o \
159 dlls
/lzexpand
/lzexpand.o \
163 dlls
/msacm32
/msacm32.o \
164 dlls
/msnet32
/msnet32.o \
165 dlls
/msvideo
/msvideo.o \
167 dlls
/odbc32
/odbc32.o \
169 dlls
/oleaut32
/oleaut32.o \
170 dlls
/olecli
/olecli.o \
171 dlls
/oledlg
/oledlg.o \
172 dlls
/olesvr
/olesvr.o \
174 dlls
/rasapi32
/rasapi32.o \
175 dlls
/shell32
/shell32.o \
177 dlls
/stress
/stress.o \
178 dlls
/tapi32
/tapi32.o \
180 dlls
/version
/version.o \
181 dlls
/win32s
/win32s.o \
182 dlls
/win87em
/win87em.o \
183 dlls
/winaspi
/winaspi.o \
184 dlls
/windebug
/windebug.o \
187 dlls
/winmm
/mcianim
/mcianim.drv.o \
188 dlls
/winmm
/mciavi
/mciavi.drv.o \
189 dlls
/winmm
/mcicda
/mcicda.drv.o \
190 dlls
/winmm
/mciseq
/mciseq.drv.o \
191 dlls
/winmm
/mciwave
/mciwave.drv.o \
192 dlls
/winmm
/midimap
/midimap.drv.o \
193 dlls
/winmm
/wavemap
/msacm.drv.o \
194 dlls
/winmm
/wineoss
/wineoss.drv.o \
195 dlls
/winspool
/winspool.o \
196 dlls
/wnaspi32
/wnaspi32.o \
198 graphics
/graphics.o \
199 graphics
/enhmetafiledrv
/enhmetafiledrv.o \
200 graphics
/metafiledrv
/metafiledrv.o \
201 graphics
/psdrv
/psdrv.o \
202 graphics
/ttydrv
/ttydrv.o \
203 graphics
/win16drv
/win16drv.o \
214 resources
/resources.o \
215 scheduler
/scheduler.o \
219 windows
/ttydrv
/ttydrv.o
222 graphics
/x11drv
/x11drv.o \
224 windows
/x11drv
/x11drv.o
227 debugger
/debugger.o \
230 LIB_TARGET
= @LIB_TARGET@
232 ALT_LINK
= @ALT_LINK@
234 all: Makefile Make.rules
$(MAIN_TARGET
)
235 @echo
"Wine build complete."
237 LIBLINTS
= $(LIBOBJS
:.o
=.ln
)
238 X11LINTS
= $(X11OBJS
:.o
=.ln
)
239 EMULINTS
= $(EMUOBJS
:.o
=.ln
)
241 lint
:: llib-lwine.ln
$(EMULINTS
)
242 $(LINT
) $(ALLLINTFLAGS
) -L.
-lwine
$(EMULINTS
)
244 WINAPI_CHECK_EXTRA_FLAGS
= --global
248 Make.rules
: Make.rules.in configure
249 @echo
$? is newer than
'Make.rules', please rerun .
/configure
!
252 install:: install_
$(MAIN_TARGET
)
254 uninstall:: uninstall_
$(MAIN_TARGET
)
258 lib
: $(LIBSUBDIRS
) $(X11SUBDIRS
) $(LIB_TARGET
)
260 wine wine.sym
: $(LIB_TARGET
) $(EMUOBJS
) $(X11OBJS
) $(LIBOBJS
)
261 $(CC
) -o wine
$(EMUOBJS
) $(ALT_LINK
) $(LDOPTIONS
) $(X_LIBS
) $(XLIB
) $(LIBS
)
262 nm
-n wine | grep
-v _compiled
>wine.sym
264 libwine.a
: $(LIBOBJS
) $(X11OBJS
)
266 $(AR
) $@
$(LIBOBJS
) $(X11OBJS
)
269 llib-lwine.ln
: $(LIBLINTS
) $(X11LINTS
)
270 $(LINT
) $(ALLLINTFLAGS
) -owine
$(LIBLINTS
) $(X11LINTS
)
272 libwine.so
.1.0: $(LIBOBJS
) $(X11OBJS
)
273 $(LDSHARED
) -o
$@
$(LIBOBJS
) $(X11OBJS
) $(LDOPTIONS
)
275 $(LN_S
) $@ libwine.so
277 install_emu
: install_lib
278 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
279 $(INSTALL_PROGRAM
) wine
$(bindir)/wine
280 $(INSTALL_PROGRAM
) loader
/dos
/dosmod
$(bindir)/dosmod
282 uninstall_emu
: uninstall_lib
283 $(RM
) $(bindir)/wine
$(bindir)/dosmod
286 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
287 if
[ -f wine.sym
]; then
$(INSTALL_DATA
) wine.sym
$(libdir)/wine.sym
; fi
288 if
[ $(LIB_TARGET
) ]; then \
289 if
[ $(LIB_TARGET
) = libwine.so
.1.0 ]; then \
290 $(INSTALL_PROGRAM
) $(LIB_TARGET
) $(libdir); \
291 $(LDCONFIG
) ||
(cd
$(libdir) ; $(RM
) libwine.so
; $(LN_S
) $(LIB_TARGET
) libwine.so
) ; \
293 $(INSTALL_DATA
) $(LIB_TARGET
) $(libdir); \
296 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
297 $(INSTALL_PROGRAM
) server
/wineserver
$(bindir)/wineserver
298 $(INSTALL_PROGRAM
) windows
/x11drv
/wineclipsrv
$(bindir)/wineclipsrv
301 cd
$(libdir) && $(RM
) $(LIB_TARGET
) libwine.a libwine.so wine.sym
302 $(RM
) $(bindir)/wineserver
$(bindir)/wineclipsrv
304 $(X11OBJS
) $(EMUOBJS
) $(LIBOBJS
): $(TOOLSUBDIRS
) dummy
305 @cd
`dirname $@`; $(SUBMAKE
)
307 $(BUILDSUBDIRS
): dummy
310 $(LIBLINTS
) $(X11LINTS
) $(EMULINTS
): dummy
311 @echo
$@ | sed
's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
314 install_programs
: dummy
315 @cd programs
; $(SUBMAKE
) install
317 uninstall_programs
: dummy
318 @cd programs
; $(SUBMAKE
) uninstall
321 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) install) || exit
1; done
324 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) uninstall) || exit
1; done
327 for i in
$(DEPENDSUBDIRS
); do
(cd
$$i && $(MAKE
) depend
) || exit
1; done
330 etags
`find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
333 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/man3w
334 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) man
); done
337 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/html
338 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) html
); done
341 for i in
$(BUILDSUBDIRS
); do
(cd
$$i; $(MAKE
) clean) || exit
1; done
342 for i in
$(CLEANSUBDIRS
); do
(cd
$$i; $(RM
) *.o \
#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
343 $(RM
) wine wine.sym libwine.a libwine.so
.1.0 libwine.so TAGS .
#*
346 $(RM
) config.
* Make.rules
include/config.h documentation
/wine.man documentation
/wine.conf.man
347 $(RM
) `find . \( -name Makefile -o -size 0 \) -print`
349 # We depend on configure above for checks, so we better don't use this rule.
350 #configure: configure.in
353 include/config.h.in
: configure.in
include/acconfig.h
354 autoheader
-l
include