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@
17 LIB_TARGET
= @LIB_TARGET@
23 TOPSRCDIR
= @top_srcdir@
89 graphics
/enhmetafiledrv \
90 graphics
/metafiledrv \
121 PROGSUBDIRS
= libtest programs
123 DOCSUBDIRS
= documentation
127 # Sub-directories to run make into
136 # Sub-directories to run make depend into
137 DEPENDSUBDIRS
= $(LIBSUBDIRS
) $(X11SUBDIRS
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
139 # Sub-directories to run make install into
140 INSTALLSUBDIRS
= $(DOCSUBDIRS
) $(INCSUBDIRS
)
142 # Sub-directories to run make lint into
143 LINTSUBDIRS
= $(LIBSUBDIRS
) $(X11SUBDIRS
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
145 # Extra sub-directories to clean
146 CLEANSUBDIRS
= dlls
include include/bitmaps
include/wine
149 controls
/controls.o \
151 dlls
/advapi32
/advapi32.o \
152 dlls
/avifil32
/avifil32.o \
153 dlls
/comctl32
/comctl32.o \
154 dlls
/commdlg
/commdlg.o \
155 dlls
/crtdll
/crtdll.o \
156 dlls
/dciman32
/dciman32.o \
157 dlls
/display
/display.o \
158 dlls
/dplayx
/dplayx.o \
159 dlls
/dsound
/dsound.o \
161 dlls
/imagehlp
/imagehlp.o \
163 dlls
/lzexpand
/lzexpand.o \
167 dlls
/msacm32
/msacm32.o \
168 dlls
/msnet32
/msnet32.o \
169 dlls
/msvideo
/msvideo.o \
171 dlls
/odbc32
/odbc32.o \
173 dlls
/oleaut32
/oleaut32.o \
174 dlls
/olecli
/olecli.o \
175 dlls
/oledlg
/oledlg.o \
176 dlls
/olesvr
/olesvr.o \
178 dlls
/rasapi32
/rasapi32.o \
179 dlls
/shell32
/shell32.o \
181 dlls
/stress
/stress.o \
182 dlls
/tapi32
/tapi32.o \
183 dlls
/version
/version.o \
184 dlls
/win32s
/win32s.o \
185 dlls
/win87em
/win87em.o \
186 dlls
/winaspi
/winaspi.o \
187 dlls
/windebug
/windebug.o \
190 dlls
/winmm
/mcianim
/mcianim.drv.o \
191 dlls
/winmm
/mciavi
/mciavi.drv.o \
192 dlls
/winmm
/mcicda
/mcicda.drv.o \
193 dlls
/winmm
/mciseq
/mciseq.drv.o \
194 dlls
/winmm
/mciwave
/mciwave.drv.o \
195 dlls
/winmm
/midimap
/midimap.drv.o \
196 dlls
/winmm
/wavemap
/msacm.drv.o \
197 dlls
/winmm
/wineoss
/wineoss.drv.o \
198 dlls
/winsock
/winsock.o \
199 dlls
/winspool
/winspool.o \
200 dlls
/wnaspi32
/wnaspi32.o \
202 graphics
/graphics.o \
203 graphics
/enhmetafiledrv
/enhmetafiledrv.o \
204 graphics
/metafiledrv
/metafiledrv.o \
205 graphics
/psdrv
/psdrv.o \
206 graphics
/ttydrv
/ttydrv.o \
207 graphics
/win16drv
/win16drv.o \
218 resources
/resources.o \
219 scheduler
/scheduler.o \
222 windows
/ttydrv
/ttydrv.o
225 graphics
/x11drv
/x11drv.o \
227 windows
/x11drv
/x11drv.o
230 debugger
/debugger.o \
233 EXTRA_OBJS
= $(LIBOBJS
) $(X11OBJS
)
235 all: Makefile Make.rules server
$(MAIN_TARGET
)
236 @echo
"Wine build complete."
238 LIBLINTS
= $(LIBOBJS
:.o
=.ln
)
239 X11LINTS
= $(X11OBJS
:.o
=.ln
)
240 EMULINTS
= $(EMUOBJS
:.o
=.ln
)
242 lint
:: llib-lwine.ln
$(EMULINTS
)
243 $(LINT
) $(ALLLINTFLAGS
) -L.
-lwine
$(EMULINTS
)
245 WINAPI_CHECK_EXTRA_FLAGS
= --global
249 Make.rules
: Make.rules.in configure
250 @echo
$? is newer than
'Make.rules', please rerun .
/configure
!
253 install:: install_
$(MAIN_TARGET
)
257 lib
: $(LIBSUBDIRS
) $(X11SUBDIRS
) $(LIB_TARGET
)
259 wine wine.sym
: $(LIB_TARGET
) $(EMUOBJS
) $(X11OBJS
) $(LIBOBJS
)
260 $(CC
) -o wine
$(EMUOBJS
) $(ALT_LINK
) $(LDOPTIONS
) $(X_LIBS
) $(XLIB
) $(LIBS
)
261 nm
-n wine | grep
-v _compiled
>wine.sym
263 llib-lwine.ln
: $(LIBLINTS
) $(X11LINTS
)
264 $(LINT
) $(ALLLINTFLAGS
) -owine
$(LIBLINTS
) $(X11LINTS
)
266 install_emu
: install_lib
267 $(INSTALL_PROGRAM
) wine
$(bindir)/wine
269 install_lib
: install_
$(LIB_TYPE
)
272 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
273 if
[ -f wine.sym
]; then
$(INSTALL_DATA
) wine.sym
$(libdir)/wine.sym
; fi
274 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
275 $(INSTALL_PROGRAM
) server
/wineserver
$(bindir)/wineserver
276 $(INSTALL_PROGRAM
) windows
/x11drv
/wineclipsrv
$(bindir)/wineclipsrv
277 $(INSTALL_PROGRAM
) loader
/dos
/dosmod
$(bindir)/dosmod
279 install_dll
: install_nolib
280 $(INSTALL_PROGRAM
) $(LIB_TARGET
) $(libdir)
281 $(LDCONFIG
) ||
(cd
$(libdir) ; $(RM
) libwine.so
; $(LN_S
) $(LIB_TARGET
) libwine.so
)
283 install_static
: install_nolib
284 $(INSTALL_DATA
) $(LIB_TARGET
) $(libdir)
287 cd
$(libdir) && $(RM
) $(LIB_TARGET
) libwine.a libwine.so wine.sym
288 cd
$(bindir) && $(RM
) wine wineserver wineclipsrv dosmod
290 $(X11OBJS
) $(EMUOBJS
) $(LIBOBJS
): $(TOOLSUBDIRS
) dummy
291 @cd
`dirname $@` && $(MAKE
) `basename $@`
293 $(BUILDSUBDIRS
): dummy
296 $(LIBLINTS
) $(X11LINTS
) $(EMULINTS
): dummy
297 @echo
$@ | sed
's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
299 install_programs
: dummy
300 @cd programs
&& $(MAKE
) install
302 uninstall_programs
: dummy
303 @cd programs
&& $(MAKE
) uninstall
306 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) install) || exit
1; done
309 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) uninstall) || exit
1; done
312 for i in
$(DEPENDSUBDIRS
); do
(cd
$$i && $(MAKE
) depend
) || exit
1; done
315 etags
`find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
318 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/man3w
319 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) man
); done
322 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/html
323 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) html
); done
326 for i in
$(BUILDSUBDIRS
); do
(cd
$$i; $(MAKE
) clean) || exit
1; done
327 for i in
$(CLEANSUBDIRS
); do
(cd
$$i; $(RM
) *.o \
#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
328 $(RM
) wine wine.sym libwine.so
.1.0 TAGS .
#*
331 $(RM
) config.
* Make.rules
include/config.h documentation
/wine.man documentation
/wine.conf.man
332 $(RM
) `find . \( -name Makefile -o -size 0 \) -print`
334 # We depend on configure above for checks, so we better don't use this rule.
335 #configure: configure.in
338 include/config.h.in
: configure.in
include/acconfig.h
339 autoheader
-l
include