1 # This Makefile understands the following targets:
3 # all (default): build wine
4 # clean: remove all intermediate files
5 # distclean: also remove all files created by configure
6 # install: install everything
7 # uninstall: uninstall everything
8 # depend: create the dependencies
9 # etags: create a TAGS file for Emacs.
10 # manpages: compile manpages for Wine API
15 TOPSRCDIR
= @top_srcdir@
40 graphics
/enhmetafiledrv \
41 graphics
/metafiledrv \
71 PROGSUBDIRS
= libtest programs
73 DOCSUBDIRS
= documentation
80 windows
/x11drv
/wineclipsrv
82 # Sub-directories to run make into
92 # Sub-directories to run make depend into
93 DEPENDSUBDIRS
= $(LIBSUBDIRS
) $(X11SUBDIRS
) $(DLLDIR
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
95 # Sub-directories to run make install into
96 INSTALLSUBDIRS
= $(DLLDIR
) $(DOCSUBDIRS
) $(INCSUBDIRS
)
98 # Sub-directories to run make lint into
99 LINTSUBDIRS
= $(LIBSUBDIRS
) $(X11SUBDIRS
) $(DLLDIR
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
101 # Extra sub-directories to clean
102 CLEANSUBDIRS
= dlls
include include/bitmaps
include/wine
105 controls
/controls.o \
107 debugger
/debugger.o \
108 dlls
/advapi32
/advapi32.o \
109 dlls
/crtdll
/crtdll.o \
110 dlls
/display
/display.o \
114 dlls
/winaspi
/winaspi.o \
116 graphics
/graphics.o \
117 graphics
/enhmetafiledrv
/enhmetafiledrv.o \
118 graphics
/metafiledrv
/metafiledrv.o \
119 graphics
/psdrv
/psdrv.o \
120 graphics
/ttydrv
/ttydrv.o \
121 graphics
/win16drv
/win16drv.o \
132 resources
/resources.o \
133 scheduler
/scheduler.o \
136 windows
/ttydrv
/ttydrv.o
139 graphics
/x11drv
/x11drv.o \
141 windows
/x11drv
/x11drv.o
146 DLLOBJS
= $(DLLS
:%=dlls
/lib
%.@LIBEXT@
)
148 EXTRA_OBJS
= $(LIBOBJS
) $(X11OBJS
)
150 EMU_TARGET
= @EMU_TARGET@
152 all: Make.rules
$(PROGRAMS
) $(EMU_TARGET
)
153 @echo
"Wine build complete."
155 LIBLINTS
= $(LIBOBJS
:.o
=.ln
)
156 X11LINTS
= $(X11OBJS
:.o
=.ln
)
157 EMULINTS
= $(EMUOBJS
:.o
=.ln
)
159 lint
:: llib-lwine.ln
$(EMULINTS
)
160 $(LINT
) $(ALLLINTFLAGS
) -L.
-lwine
$(EMULINTS
)
162 WINAPI_CHECK_EXTRA_FLAGS
= --global
166 all: lib
$(MODULE
).
$(LIBEXT
) $(DLLOBJS
)
168 Make.rules
: Make.rules.in configure
169 @echo
$? is newer than
'Make.rules', please rerun .
/configure
!
172 wine wine.sym
: lib
$(MODULE
).
$(LIBEXT
) $(DLLOBJS
) $(EMUOBJS
)
173 $(CC
) -o wine
$(EMUOBJS
) $(DLL_LINK
) $(LDOPTIONS
) $(X_LIBS
) $(XLIB
) $(LIBS
)
174 nm
-n wine | grep
-v _compiled
>wine.sym
176 llib-lwine.ln
: $(LIBLINTS
) $(X11LINTS
)
177 $(LINT
) $(ALLLINTFLAGS
) -owine
$(LIBLINTS
) $(X11LINTS
)
180 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
181 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
182 [ -f wine.sym
] && $(INSTALL_DATA
) wine.sym
$(libdir)/wine.sym
183 $(INSTALL_PROGRAM
) wine
$(bindir)/wine
185 install:: $(PROGRAMS
) $(EMU_TARGET
:%=install_
%)
186 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
187 $(INSTALL_PROGRAM
) server
/wineserver
$(bindir)/wineserver
188 $(INSTALL_PROGRAM
) windows
/x11drv
/wineclipsrv
$(bindir)/wineclipsrv
189 $(INSTALL_PROGRAM
) loader
/dos
/dosmod
$(bindir)/dosmod
192 cd
$(libdir) && $(RM
) libwine.a libwine.so libwine.so.
$(SOVERSION
) wine.sym
193 cd
$(bindir) && $(RM
) wine wineserver wineclipsrv dosmod
195 $(X11OBJS
) $(EMUOBJS
) $(LIBOBJS
) $(DLLOBJS
) $(PROGRAMS
): $(TOOLSUBDIRS
) dummy
196 @cd
`dirname $@` && $(MAKE
) `basename $@`
198 $(BUILDSUBDIRS
): dummy
201 $(LIBLINTS
) $(X11LINTS
) $(EMULINTS
): dummy
202 @echo
$@ | sed
's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
204 install_programs
: dummy
205 @cd programs
&& $(MAKE
) install
207 uninstall_programs
: dummy
208 @cd programs
&& $(MAKE
) uninstall
211 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) install) || exit
1; done
215 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) uninstall) || exit
1; done
218 for i in
$(DEPENDSUBDIRS
); do
(cd
$$i && $(MAKE
) depend
) || exit
1; done
221 @cd dlls
&& $(MAKE
) checklink
224 etags
`find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
227 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/man3w
228 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) man
); done
231 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/html
232 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) html
); done
235 for i in
$(BUILDSUBDIRS
); do
(cd
$$i; $(MAKE
) clean) || exit
1; done
236 for i in
$(CLEANSUBDIRS
); do
(cd
$$i; $(RM
) *.o \
#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
237 $(RM
) wine wine.sym libwine.so
.1.0 TAGS .
#*
240 $(RM
) config.
* Make.rules
include/config.h documentation
/wine.man documentation
/wine.conf.man
241 $(RM
) `find . \( -name Makefile -o -size 0 \) -print`
243 # We depend on configure above for checks, so we better don't use this rule.
244 #configure: configure.in
247 include/config.h.in
: configure.in
include/acconfig.h
248 autoheader
-l
include