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
130 windows
/x11drv
/wineclipsrv
132 # Sub-directories to run make into
141 # Sub-directories to run make depend into
142 DEPENDSUBDIRS
= $(LIBSUBDIRS
) $(X11SUBDIRS
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
144 # Sub-directories to run make install into
145 INSTALLSUBDIRS
= $(DOCSUBDIRS
) $(INCSUBDIRS
)
147 # Sub-directories to run make lint into
148 LINTSUBDIRS
= $(LIBSUBDIRS
) $(X11SUBDIRS
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
150 # Extra sub-directories to clean
151 CLEANSUBDIRS
= dlls
include include/bitmaps
include/wine
154 controls
/controls.o \
156 dlls
/advapi32
/advapi32.o \
157 dlls
/avifil32
/avifil32.o \
158 dlls
/comctl32
/comctl32.o \
159 dlls
/commdlg
/commdlg.o \
160 dlls
/crtdll
/crtdll.o \
161 dlls
/dciman32
/dciman32.o \
162 dlls
/display
/display.o \
163 dlls
/dplayx
/dplayx.o \
164 dlls
/dsound
/dsound.o \
166 dlls
/imagehlp
/imagehlp.o \
168 dlls
/lzexpand
/lzexpand.o \
172 dlls
/msacm32
/msacm32.o \
173 dlls
/msnet32
/msnet32.o \
174 dlls
/msvideo
/msvideo.o \
176 dlls
/odbc32
/odbc32.o \
178 dlls
/oleaut32
/oleaut32.o \
179 dlls
/olecli
/olecli.o \
180 dlls
/oledlg
/oledlg.o \
181 dlls
/olesvr
/olesvr.o \
183 dlls
/rasapi32
/rasapi32.o \
184 dlls
/shell32
/shell32.o \
186 dlls
/stress
/stress.o \
187 dlls
/tapi32
/tapi32.o \
188 dlls
/version
/version.o \
189 dlls
/win32s
/win32s.o \
190 dlls
/win87em
/win87em.o \
191 dlls
/winaspi
/winaspi.o \
192 dlls
/windebug
/windebug.o \
195 dlls
/winmm
/mcianim
/mcianim.drv.o \
196 dlls
/winmm
/mciavi
/mciavi.drv.o \
197 dlls
/winmm
/mcicda
/mcicda.drv.o \
198 dlls
/winmm
/mciseq
/mciseq.drv.o \
199 dlls
/winmm
/mciwave
/mciwave.drv.o \
200 dlls
/winmm
/midimap
/midimap.drv.o \
201 dlls
/winmm
/wavemap
/msacm.drv.o \
202 dlls
/winmm
/wineoss
/wineoss.drv.o \
203 dlls
/winsock
/winsock.o \
204 dlls
/winspool
/winspool.o \
205 dlls
/wnaspi32
/wnaspi32.o \
207 graphics
/graphics.o \
208 graphics
/enhmetafiledrv
/enhmetafiledrv.o \
209 graphics
/metafiledrv
/metafiledrv.o \
210 graphics
/psdrv
/psdrv.o \
211 graphics
/ttydrv
/ttydrv.o \
212 graphics
/win16drv
/win16drv.o \
223 resources
/resources.o \
224 scheduler
/scheduler.o \
227 windows
/ttydrv
/ttydrv.o
230 graphics
/x11drv
/x11drv.o \
232 windows
/x11drv
/x11drv.o
235 debugger
/debugger.o \
238 EXTRA_OBJS
= $(LIBOBJS
) $(X11OBJS
)
240 all: Makefile Make.rules
$(PROGRAMS
) $(MAIN_TARGET
)
241 @echo
"Wine build complete."
243 LIBLINTS
= $(LIBOBJS
:.o
=.ln
)
244 X11LINTS
= $(X11OBJS
:.o
=.ln
)
245 EMULINTS
= $(EMUOBJS
:.o
=.ln
)
247 lint
:: llib-lwine.ln
$(EMULINTS
)
248 $(LINT
) $(ALLLINTFLAGS
) -L.
-lwine
$(EMULINTS
)
250 WINAPI_CHECK_EXTRA_FLAGS
= --global
254 Make.rules
: Make.rules.in configure
255 @echo
$? is newer than
'Make.rules', please rerun .
/configure
!
258 install:: install_
$(MAIN_TARGET
)
262 lib
: $(LIBSUBDIRS
) $(X11SUBDIRS
) $(LIB_TARGET
)
264 wine wine.sym
: $(LIB_TARGET
) $(EMUOBJS
) $(X11OBJS
) $(LIBOBJS
)
265 $(CC
) -o wine
$(EMUOBJS
) $(ALT_LINK
) $(LDOPTIONS
) $(X_LIBS
) $(XLIB
) $(LIBS
)
266 nm
-n wine | grep
-v _compiled
>wine.sym
268 llib-lwine.ln
: $(LIBLINTS
) $(X11LINTS
)
269 $(LINT
) $(ALLLINTFLAGS
) -owine
$(LIBLINTS
) $(X11LINTS
)
271 install_emu
: install_lib
272 $(INSTALL_PROGRAM
) wine
$(bindir)/wine
274 install_lib
: install_
$(LIB_TYPE
)
277 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
278 if
[ -f wine.sym
]; then
$(INSTALL_DATA
) wine.sym
$(libdir)/wine.sym
; fi
279 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
280 $(INSTALL_PROGRAM
) server
/wineserver
$(bindir)/wineserver
281 $(INSTALL_PROGRAM
) windows
/x11drv
/wineclipsrv
$(bindir)/wineclipsrv
282 $(INSTALL_PROGRAM
) loader
/dos
/dosmod
$(bindir)/dosmod
284 install_dll
: install_nolib
285 $(INSTALL_PROGRAM
) $(LIB_TARGET
) $(libdir)
286 $(LDCONFIG
) ||
(cd
$(libdir) ; $(RM
) libwine.so
; $(LN_S
) $(LIB_TARGET
) libwine.so
)
288 install_static
: install_nolib
289 $(INSTALL_DATA
) $(LIB_TARGET
) $(libdir)
292 cd
$(libdir) && $(RM
) $(LIB_TARGET
) libwine.a libwine.so wine.sym
293 cd
$(bindir) && $(RM
) wine wineserver wineclipsrv dosmod
295 $(X11OBJS
) $(EMUOBJS
) $(LIBOBJS
) $(PROGRAMS
): $(TOOLSUBDIRS
) dummy
296 @cd
`dirname $@` && $(MAKE
) `basename $@`
298 $(BUILDSUBDIRS
): dummy
301 $(LIBLINTS
) $(X11LINTS
) $(EMULINTS
): dummy
302 @echo
$@ | sed
's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
304 install_programs
: dummy
305 @cd programs
&& $(MAKE
) install
307 uninstall_programs
: dummy
308 @cd programs
&& $(MAKE
) uninstall
311 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) install) || exit
1; done
314 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) uninstall) || exit
1; done
317 for i in
$(DEPENDSUBDIRS
); do
(cd
$$i && $(MAKE
) depend
) || exit
1; done
320 etags
`find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
323 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/man3w
324 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) man
); done
327 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/html
328 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) html
); done
331 for i in
$(BUILDSUBDIRS
); do
(cd
$$i; $(MAKE
) clean) || exit
1; done
332 for i in
$(CLEANSUBDIRS
); do
(cd
$$i; $(RM
) *.o \
#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
333 $(RM
) wine wine.sym libwine.so
.1.0 TAGS .
#*
336 $(RM
) config.
* Make.rules
include/config.h documentation
/wine.man documentation
/wine.conf.man
337 $(RM
) `find . \( -name Makefile -o -size 0 \) -print`
339 # We depend on configure above for checks, so we better don't use this rule.
340 #configure: configure.in
343 include/config.h.in
: configure.in
include/acconfig.h
344 autoheader
-l
include