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@
43 graphics
/enhmetafiledrv \
44 graphics
/metafiledrv \
74 PROGSUBDIRS
= libtest programs
76 DOCSUBDIRS
= documentation
83 windows
/x11drv
/wineclipsrv
85 # Sub-directories to run make into
95 # Sub-directories to run make depend into
96 DEPENDSUBDIRS
= $(LIBSUBDIRS
) $(X11SUBDIRS
) $(DLLDIR
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
98 # Sub-directories to run make install into
99 INSTALLSUBDIRS
= $(DLLDIR
) $(DOCSUBDIRS
) $(INCSUBDIRS
)
101 # Sub-directories to run make lint into
102 LINTSUBDIRS
= $(LIBSUBDIRS
) $(X11SUBDIRS
) $(DLLDIR
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
104 # Extra sub-directories to clean
105 CLEANSUBDIRS
= dlls
include include/bitmaps
include/wine
108 controls
/controls.o \
110 debugger
/debugger.o \
111 dlls
/advapi32
/advapi32.o \
112 dlls
/crtdll
/crtdll.o \
113 dlls
/display
/display.o \
117 dlls
/winaspi
/winaspi.o \
119 graphics
/graphics.o \
120 graphics
/enhmetafiledrv
/enhmetafiledrv.o \
121 graphics
/metafiledrv
/metafiledrv.o \
122 graphics
/psdrv
/psdrv.o \
123 graphics
/ttydrv
/ttydrv.o \
124 graphics
/win16drv
/win16drv.o \
135 resources
/resources.o \
136 scheduler
/scheduler.o \
139 windows
/ttydrv
/ttydrv.o
142 graphics
/x11drv
/x11drv.o \
144 windows
/x11drv
/x11drv.o
149 DLLOBJS
= $(DLLS
:%=dlls
/lib
%.@LIBEXT@
)
151 EXTRA_OBJS
= $(LIBOBJS
) $(X11OBJS
)
153 EMU_TARGET
= @EMU_TARGET@
155 all: Make.rules
$(PROGRAMS
) $(EMU_TARGET
)
156 @echo
"Wine build complete."
158 LIBLINTS
= $(LIBOBJS
:.o
=.ln
)
159 X11LINTS
= $(X11OBJS
:.o
=.ln
)
160 EMULINTS
= $(EMUOBJS
:.o
=.ln
)
162 lint
:: llib-lwine.ln
$(EMULINTS
)
163 $(LINT
) $(ALLLINTFLAGS
) -L.
-lwine
$(EMULINTS
)
165 WINAPI_CHECK_EXTRA_FLAGS
= --global
169 all: lib
$(MODULE
).
$(LIBEXT
) $(DLLOBJS
)
171 Make.rules
: Make.rules.in configure
172 @echo
$? is newer than
'Make.rules', please rerun .
/configure
!
175 wine wine.sym
: lib
$(MODULE
).
$(LIBEXT
) $(DLLOBJS
) $(EMUOBJS
)
176 $(CC
) -o wine
$(EMUOBJS
) $(DLL_LINK
) $(LDOPTIONS
) $(X_LIBS
) $(XLIB
) $(LIBS
)
177 nm
-n wine | grep
-v _compiled
>wine.sym
179 llib-lwine.ln
: $(LIBLINTS
) $(X11LINTS
)
180 $(LINT
) $(ALLLINTFLAGS
) -owine
$(LIBLINTS
) $(X11LINTS
)
182 install_so
: lib
$(MODULE
).so.
$(SOVERSION
)
183 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
184 $(INSTALL_PROGRAM
) lib
$(MODULE
).so.
$(SOVERSION
) $(libdir)/lib
$(MODULE
).so.
$(SOVERSION
)
185 cd
$(libdir) && $(RM
) lib
$(MODULE
).so
&& $(LN_S
) lib
$(MODULE
).so.
$(SOVERSION
) lib
$(MODULE
).so
187 install_a
: lib
$(MODULE
).a
188 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
189 $(INSTALL_DATA
) lib
$(MODULE
).a
$(libdir)/lib
$(MODULE
).a
192 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
193 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
194 [ -f wine.sym
] && $(INSTALL_DATA
) wine.sym
$(libdir)/wine.sym
195 $(INSTALL_PROGRAM
) wine
$(bindir)/wine
197 install:: $(PROGRAMS
) $(EMU_TARGET
:%=install_
%) $(LIBEXT
:%=install_
%)
198 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
199 $(INSTALL_PROGRAM
) server
/wineserver
$(bindir)/wineserver
200 $(INSTALL_PROGRAM
) windows
/x11drv
/wineclipsrv
$(bindir)/wineclipsrv
201 $(INSTALL_PROGRAM
) loader
/dos
/dosmod
$(bindir)/dosmod
204 cd
$(libdir) && $(RM
) libwine.a libwine.so libwine.so.
$(SOVERSION
) wine.sym
205 cd
$(bindir) && $(RM
) wine wineserver wineclipsrv dosmod
207 lib
$(MODULE
).so.
$(SOVERSION
): $(OBJS
) Makefile.in Make.rules.in
208 $(LDSHARED
) $(OBJS
) -o
$@
210 lib
$(MODULE
).so
: lib
$(MODULE
).so.
$(SOVERSION
)
211 $(RM
) $@
&& $(LN_S
) lib
$(MODULE
).so.
$(SOVERSION
) $@
213 lib
$(MODULE
).a
: $(OBJS
) Makefile.in Make.rules.in
219 $(CC
) -o checklink
$(TOPSRCDIR
)/library
/checklink.c
-L.
-lwine
$(LDOPTIONS
) $(X_LIBS
) $(XLIB
) $(LIBS
) && $(RM
) checklink
221 $(X11OBJS
) $(EMUOBJS
) $(LIBOBJS
) $(DLLOBJS
) $(PROGRAMS
): $(TOOLSUBDIRS
) dummy
222 @cd
`dirname $@` && $(MAKE
) `basename $@`
224 $(BUILDSUBDIRS
): dummy
227 $(LIBLINTS
) $(X11LINTS
) $(EMULINTS
): dummy
228 @echo
$@ | sed
's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
230 install_programs
: dummy
231 @cd programs
&& $(MAKE
) install
233 uninstall_programs
: dummy
234 @cd programs
&& $(MAKE
) uninstall
237 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) install) || exit
1; done
241 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) uninstall) || exit
1; done
244 for i in
$(DEPENDSUBDIRS
); do
(cd
$$i && $(MAKE
) depend
) || exit
1; done
247 @cd dlls
&& $(MAKE
) checklink
250 etags
`find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
253 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/man3w
254 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) man
); done
257 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/html
258 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) html
); done
261 for i in
$(BUILDSUBDIRS
); do
(cd
$$i; $(MAKE
) clean) || exit
1; done
262 for i in
$(CLEANSUBDIRS
); do
(cd
$$i; $(RM
) *.o \
#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
263 $(RM
) wine wine.sym libwine.so
.1.0 TAGS .
#*
266 $(RM
) config.
* Make.rules dlls
/Makedll.rules
include/config.h documentation
/wine.man documentation
/wine.conf.man
267 $(RM
) `find . \( -name Makefile -o -size 0 \) -print`
269 # We depend on configure above for checks, so we better don't use this rule.
270 #configure: configure.in
273 include/config.h.in
: configure.in
include/acconfig.h
274 autoheader
-l
include