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@
41 graphics
/enhmetafiledrv \
42 graphics
/metafiledrv \
72 PROGSUBDIRS
= libtest programs
74 DOCSUBDIRS
= documentation
81 windows
/x11drv
/wineclipsrv
83 # Sub-directories to run make into
93 # Sub-directories to run make depend into
94 DEPENDSUBDIRS
= $(LIBSUBDIRS
) $(X11SUBDIRS
) $(DLLDIR
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
96 # Sub-directories to run make install into
97 INSTALLSUBDIRS
= $(DLLDIR
) $(DOCSUBDIRS
) $(INCSUBDIRS
)
99 # Sub-directories to run make lint into
100 LINTSUBDIRS
= $(LIBSUBDIRS
) $(X11SUBDIRS
) $(DLLDIR
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
102 # Extra sub-directories to clean
103 CLEANSUBDIRS
= dlls
include include/bitmaps
include/wine
106 controls
/controls.o \
108 debugger
/debugger.o \
109 dlls
/advapi32
/advapi32.o \
110 dlls
/crtdll
/crtdll.o \
111 dlls
/display
/display.o \
115 graphics
/graphics.o \
116 graphics
/enhmetafiledrv
/enhmetafiledrv.o \
117 graphics
/metafiledrv
/metafiledrv.o \
118 graphics
/psdrv
/psdrv.o \
119 graphics
/ttydrv
/ttydrv.o \
120 graphics
/win16drv
/win16drv.o \
131 resources
/resources.o \
132 scheduler
/scheduler.o \
135 windows
/ttydrv
/ttydrv.o
138 graphics
/x11drv
/x11drv.o \
140 windows
/x11drv
/x11drv.o
145 DLLOBJS
= $(DLLS
:%=dlls
/lib
%.@LIBEXT@
)
147 EXTRA_OBJS
= $(LIBOBJS
) $(X11OBJS
)
149 EMU_TARGET
= @EMU_TARGET@
151 all: Make.rules
$(PROGRAMS
) $(EMU_TARGET
)
152 @echo
"Wine build complete."
154 LIBLINTS
= $(LIBOBJS
:.o
=.ln
)
155 X11LINTS
= $(X11OBJS
:.o
=.ln
)
156 EMULINTS
= $(EMUOBJS
:.o
=.ln
)
158 lint
:: llib-lwine.ln
$(EMULINTS
)
159 $(LINT
) $(ALLLINTFLAGS
) -L.
-lwine
$(EMULINTS
)
161 WINAPI_CHECK_EXTRA_FLAGS
= --global
165 all: lib
$(MODULE
).
$(LIBEXT
) $(DLLOBJS
)
167 Make.rules
: Make.rules.in configure
168 @echo
$? is newer than
'Make.rules', please rerun .
/configure
!
171 wine wine.sym
: lib
$(MODULE
).
$(LIBEXT
) $(DLLOBJS
) $(EMUOBJS
)
172 $(CC
) -o wine
$(EMUOBJS
) $(DLL_LINK
) $(LDOPTIONS
) $(X_LIBS
) $(XLIB
) $(LIBS
)
173 nm
-n wine | grep
-v _compiled
>wine.sym
175 llib-lwine.ln
: $(LIBLINTS
) $(X11LINTS
)
176 $(LINT
) $(ALLLINTFLAGS
) -owine
$(LIBLINTS
) $(X11LINTS
)
178 install_so
: lib
$(MODULE
).so.
$(SOVERSION
)
179 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
180 $(INSTALL_PROGRAM
) lib
$(MODULE
).so.
$(SOVERSION
) $(libdir)/lib
$(MODULE
).so.
$(SOVERSION
)
181 cd
$(libdir) && $(RM
) lib
$(MODULE
).so
&& $(LN_S
) lib
$(MODULE
).so.
$(SOVERSION
) lib
$(MODULE
).so
183 install_a
: lib
$(MODULE
).a
184 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
185 $(INSTALL_DATA
) lib
$(MODULE
).a
$(libdir)/lib
$(MODULE
).a
188 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
189 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
190 [ -f wine.sym
] && $(INSTALL_DATA
) wine.sym
$(libdir)/wine.sym
191 $(INSTALL_PROGRAM
) wine
$(bindir)/wine
193 install:: $(PROGRAMS
) $(EMU_TARGET
:%=install_
%) $(LIBEXT
:%=install_
%)
194 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
195 $(INSTALL_PROGRAM
) server
/wineserver
$(bindir)/wineserver
196 $(INSTALL_PROGRAM
) windows
/x11drv
/wineclipsrv
$(bindir)/wineclipsrv
197 $(INSTALL_PROGRAM
) loader
/dos
/dosmod
$(bindir)/dosmod
200 cd
$(libdir) && $(RM
) libwine.a libwine.so libwine.so.
$(SOVERSION
) wine.sym
201 cd
$(bindir) && $(RM
) wine wineserver wineclipsrv dosmod
203 lib
$(MODULE
).so.
$(SOVERSION
): $(OBJS
) Makefile.in Make.rules.in
204 $(LDSHARED
) $(OBJS
) -o
$@
206 lib
$(MODULE
).so
: lib
$(MODULE
).so.
$(SOVERSION
)
207 $(RM
) $@
&& $(LN_S
) lib
$(MODULE
).so.
$(SOVERSION
) $@
209 lib
$(MODULE
).a
: $(OBJS
) Makefile.in Make.rules.in
215 $(CC
) -o checklink
$(TOPSRCDIR
)/library
/checklink.c
-L.
-lwine
$(LDOPTIONS
) $(X_LIBS
) $(XLIB
) $(LIBS
) && $(RM
) checklink
217 $(X11OBJS
) $(EMUOBJS
) $(LIBOBJS
) $(DLLOBJS
) $(PROGRAMS
): $(TOOLSUBDIRS
) dummy
218 @cd
`dirname $@` && $(MAKE
) `basename $@`
220 $(BUILDSUBDIRS
): dummy
223 $(LIBLINTS
) $(X11LINTS
) $(EMULINTS
): dummy
224 @echo
$@ | sed
's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
226 install_programs
: dummy
227 @cd programs
&& $(MAKE
) install
229 uninstall_programs
: dummy
230 @cd programs
&& $(MAKE
) uninstall
233 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) install) || exit
1; done
237 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) uninstall) || exit
1; done
240 for i in
$(DEPENDSUBDIRS
); do
(cd
$$i && $(MAKE
) depend
) || exit
1; done
243 @cd dlls
&& $(MAKE
) checklink
246 etags
`find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
249 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/man3w
250 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) man
); done
253 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/html
254 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) html
); done
257 for i in
$(BUILDSUBDIRS
); do
(cd
$$i; $(MAKE
) clean) || exit
1; done
258 for i in
$(CLEANSUBDIRS
); do
(cd
$$i; $(RM
) *.o \
#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
259 $(RM
) wine wine.sym libwine.so
.1.0 TAGS .
#*
262 $(RM
) config.
* Make.rules dlls
/Makedll.rules
include/config.h documentation
/wine.man documentation
/wine.conf.man
263 $(RM
) `find . \( -name Makefile -o -size 0 \) -print`
265 # We depend on configure above for checks, so we better don't use this rule.
266 #configure: configure.in
269 include/config.h.in
: configure.in
include/acconfig.h
270 autoheader
-l
include