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@
42 graphics
/enhmetafiledrv \
43 graphics
/metafiledrv \
73 PROGSUBDIRS
= libtest programs
75 DOCSUBDIRS
= documentation
82 windows
/x11drv
/wineclipsrv
84 # Sub-directories to run make into
94 # Sub-directories to run make depend into
95 DEPENDSUBDIRS
= $(LIBSUBDIRS
) $(X11SUBDIRS
) $(DLLDIR
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
97 # Sub-directories to run make install into
98 INSTALLSUBDIRS
= $(DLLDIR
) $(DOCSUBDIRS
) $(INCSUBDIRS
)
100 # Sub-directories to run make lint into
101 LINTSUBDIRS
= $(LIBSUBDIRS
) $(X11SUBDIRS
) $(DLLDIR
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
103 # Extra sub-directories to clean
104 CLEANSUBDIRS
= dlls
include include/bitmaps
include/wine
107 controls
/controls.o \
109 debugger
/debugger.o \
110 dlls
/advapi32
/advapi32.o \
111 dlls
/crtdll
/crtdll.o \
112 dlls
/display
/display.o \
117 graphics
/graphics.o \
118 graphics
/enhmetafiledrv
/enhmetafiledrv.o \
119 graphics
/metafiledrv
/metafiledrv.o \
120 graphics
/psdrv
/psdrv.o \
121 graphics
/ttydrv
/ttydrv.o \
122 graphics
/win16drv
/win16drv.o \
133 resources
/resources.o \
134 scheduler
/scheduler.o \
137 windows
/ttydrv
/ttydrv.o
140 graphics
/x11drv
/x11drv.o \
142 windows
/x11drv
/x11drv.o
147 DLLOBJS
= $(DLLS
:%=dlls
/lib
%.@LIBEXT@
)
149 EXTRA_OBJS
= $(LIBOBJS
) $(X11OBJS
)
151 EMU_TARGET
= @EMU_TARGET@
153 all: Make.rules
$(PROGRAMS
) $(EMU_TARGET
)
154 @echo
"Wine build complete."
156 LIBLINTS
= $(LIBOBJS
:.o
=.ln
)
157 X11LINTS
= $(X11OBJS
:.o
=.ln
)
158 EMULINTS
= $(EMUOBJS
:.o
=.ln
)
160 lint
:: llib-lwine.ln
$(EMULINTS
)
161 $(LINT
) $(ALLLINTFLAGS
) -L.
-lwine
$(EMULINTS
)
163 WINAPI_CHECK_EXTRA_FLAGS
= --global
167 all: lib
$(MODULE
).
$(LIBEXT
) $(DLLOBJS
)
169 Make.rules
: Make.rules.in configure
170 @echo
$? is newer than
'Make.rules', please rerun .
/configure
!
173 wine wine.sym
: lib
$(MODULE
).
$(LIBEXT
) $(DLLOBJS
) $(EMUOBJS
)
174 $(CC
) -o wine
$(EMUOBJS
) $(DLL_LINK
) $(LDOPTIONS
) $(X_LIBS
) $(XLIB
) $(LIBS
)
175 nm
-n wine | grep
-v _compiled
>wine.sym
177 llib-lwine.ln
: $(LIBLINTS
) $(X11LINTS
)
178 $(LINT
) $(ALLLINTFLAGS
) -owine
$(LIBLINTS
) $(X11LINTS
)
180 install_so
: lib
$(MODULE
).so.
$(SOVERSION
)
181 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
182 $(INSTALL_PROGRAM
) lib
$(MODULE
).so.
$(SOVERSION
) $(libdir)/lib
$(MODULE
).so.
$(SOVERSION
)
183 cd
$(libdir) && $(RM
) lib
$(MODULE
).so
&& $(LN_S
) lib
$(MODULE
).so.
$(SOVERSION
) lib
$(MODULE
).so
185 install_a
: lib
$(MODULE
).a
186 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
187 $(INSTALL_DATA
) lib
$(MODULE
).a
$(libdir)/lib
$(MODULE
).a
190 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
191 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
192 [ -f wine.sym
] && $(INSTALL_DATA
) wine.sym
$(libdir)/wine.sym
193 $(INSTALL_PROGRAM
) wine
$(bindir)/wine
195 install:: $(PROGRAMS
) $(EMU_TARGET
:%=install_
%) $(LIBEXT
:%=install_
%)
196 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
197 $(INSTALL_PROGRAM
) server
/wineserver
$(bindir)/wineserver
198 $(INSTALL_PROGRAM
) windows
/x11drv
/wineclipsrv
$(bindir)/wineclipsrv
199 $(INSTALL_PROGRAM
) loader
/dos
/dosmod
$(bindir)/dosmod
202 cd
$(libdir) && $(RM
) libwine.a libwine.so libwine.so.
$(SOVERSION
) wine.sym
203 cd
$(bindir) && $(RM
) wine wineserver wineclipsrv dosmod
205 lib
$(MODULE
).so.
$(SOVERSION
): $(OBJS
) Makefile.in Make.rules.in
206 $(LDSHARED
) $(OBJS
) -o
$@
208 lib
$(MODULE
).so
: lib
$(MODULE
).so.
$(SOVERSION
)
209 $(RM
) $@
&& $(LN_S
) lib
$(MODULE
).so.
$(SOVERSION
) $@
211 lib
$(MODULE
).a
: $(OBJS
) Makefile.in Make.rules.in
217 $(CC
) -o checklink
$(TOPSRCDIR
)/library
/checklink.c
-L.
-lwine
$(LDOPTIONS
) $(X_LIBS
) $(XLIB
) $(LIBS
) && $(RM
) checklink
219 $(X11OBJS
) $(EMUOBJS
) $(LIBOBJS
) $(DLLOBJS
) $(PROGRAMS
): $(TOOLSUBDIRS
) dummy
220 @cd
`dirname $@` && $(MAKE
) `basename $@`
222 $(BUILDSUBDIRS
): dummy
225 $(LIBLINTS
) $(X11LINTS
) $(EMULINTS
): dummy
226 @echo
$@ | sed
's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
228 install_programs
: dummy
229 @cd programs
&& $(MAKE
) install
231 uninstall_programs
: dummy
232 @cd programs
&& $(MAKE
) uninstall
235 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) install) || exit
1; done
239 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) uninstall) || exit
1; done
242 for i in
$(DEPENDSUBDIRS
); do
(cd
$$i && $(MAKE
) depend
) || exit
1; done
245 @cd dlls
&& $(MAKE
) checklink
248 etags
`find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
251 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/man3w
252 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) man
); done
255 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/html
256 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) html
); done
259 for i in
$(BUILDSUBDIRS
); do
(cd
$$i; $(MAKE
) clean) || exit
1; done
260 for i in
$(CLEANSUBDIRS
); do
(cd
$$i; $(RM
) *.o \
#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
261 $(RM
) wine wine.sym libwine.so
.1.0 TAGS .
#*
264 $(RM
) config.
* Make.rules dlls
/Makedll.rules
include/config.h documentation
/wine.man documentation
/wine.conf.man
265 $(RM
) `find . \( -name Makefile -o -size 0 \) -print`
267 # We depend on configure above for checks, so we better don't use this rule.
268 #configure: configure.in
271 include/config.h.in
: configure.in
include/acconfig.h
272 autoheader
-l
include