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@
38 graphics
/enhmetafiledrv \
39 graphics
/metafiledrv \
66 DOCSUBDIRS
= documentation
70 # Stand-alone programs
75 # Programs that link with libwine
79 # Sub-directories to run make into
89 # Sub-directories to run make install into
90 INSTALLSUBDIRS
= $(DLLDIR
) $(DOCSUBDIRS
) $(INCSUBDIRS
)
92 # Sub-directories to run make lint into
93 LINTSUBDIRS
= $(LIBSUBDIRS
) $(DLLDIR
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
98 dlls
/advapi32
/advapi32.o \
99 dlls
/crtdll
/crtdll.o \
100 dlls
/display
/display.o \
104 graphics
/graphics.o \
105 graphics
/enhmetafiledrv
/enhmetafiledrv.o \
106 graphics
/metafiledrv
/metafiledrv.o \
107 graphics
/win16drv
/win16drv.o \
118 resources
/resources.o \
119 scheduler
/scheduler.o \
126 DLLOBJS
= $(DLLS
:%=dlls
/lib
%.@LIBEXT@
)
128 EXTRA_OBJS
= $(LIBOBJS
)
130 EMU_TARGET
= @EMU_TARGET@
132 all: Make.rules
$(PROGRAMS
) $(LIBPROGRAMS
) lib
$(MODULE
).
$(LIBEXT
) $(DLLDIR
) $(EMU_TARGET
)
133 @echo
"Wine build complete."
135 LIBLINTS
= $(LIBOBJS
:.o
=.ln
)
136 EMULINTS
= $(EMUOBJS
:.o
=.ln
)
138 lint
:: llib-lwine.ln
$(EMULINTS
)
139 $(LINT
) $(ALLLINTFLAGS
) -L.
-lwine
$(EMULINTS
)
141 WINAPI_CHECK_EXTRA_FLAGS
= --global
145 Make.rules
: Make.rules.in configure
146 @echo
$? is newer than
'Make.rules', please rerun .
/configure
!
149 wine
: lib
$(MODULE
).
$(LIBEXT
) $(DLLDIR
) $(EMUOBJS
)
150 $(CC
) -o wine
$(EMUOBJS
) $(DLL_LINK
) $(LIBS
)
152 llib-lwine.ln
: $(LIBLINTS
)
153 $(LINT
) $(ALLLINTFLAGS
) -owine
$(LIBLINTS
)
155 install_so
: lib
$(MODULE
).so.
$(SOVERSION
)
156 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
157 $(INSTALL_PROGRAM
) lib
$(MODULE
).so.
$(SOVERSION
) $(libdir)/lib
$(MODULE
).so.
$(SOVERSION
)
158 cd
$(libdir) && $(RM
) lib
$(MODULE
).so
&& $(LN_S
) lib
$(MODULE
).so.
$(SOVERSION
) lib
$(MODULE
).so
160 install_a
: lib
$(MODULE
).a
161 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
162 $(INSTALL_DATA
) lib
$(MODULE
).a
$(libdir)/lib
$(MODULE
).a
165 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
166 $(INSTALL_PROGRAM
) wine
$(bindir)/wine
168 install:: $(PROGRAMS
) $(LIBPROGRAMS
) $(EMU_TARGET
:%=install_
%) $(LIBEXT
:%=install_
%)
169 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
170 $(INSTALL_PROGRAM
) server
/wineserver
$(bindir)/wineserver
171 $(INSTALL_PROGRAM
) loader
/dos
/dosmod
$(bindir)/dosmod
172 $(INSTALL_PROGRAM
) debugger
/winedbg
$(bindir)/winedbg
175 cd
$(libdir) && $(RM
) libwine.a libwine.so libwine.so.
$(SOVERSION
)
176 cd
$(bindir) && $(RM
) wine wineserver dosmod winedbg
178 lib
$(MODULE
).so.
$(SOVERSION
): $(OBJS
) Makefile.in Make.rules.in
179 $(LDSHARED
) $(OBJS
) -o
$@
181 lib
$(MODULE
).so
: lib
$(MODULE
).so.
$(SOVERSION
)
182 $(RM
) $@
&& $(LN_S
) lib
$(MODULE
).so.
$(SOVERSION
) $@
184 lib
$(MODULE
).a
: $(OBJS
) Makefile.in Make.rules.in
190 $(CC
) -o checklink
$(TOPSRCDIR
)/library
/checklink.c
-L.
-lwine
$(LIBS
) && $(RM
) checklink
192 $(EMUOBJS
) $(LIBOBJS
) $(DLLOBJS
) $(PROGRAMS
) $(LIBPROGRAMS
): $(TOOLSUBDIRS
) dummy
193 @cd
`dirname $@` && $(MAKE
) `basename $@`
195 $(DLLDIR
): $(TOOLSUBDIRS
) dummy
197 $(LIBPROGRAMS
): lib
$(MODULE
).
$(LIBEXT
) $(DLLDIR
)
199 $(LIBLINTS
) $(EMULINTS
): dummy
200 @cd
`dirname $@` && $(MAKE
) lint
202 install_programs
: dummy
203 @cd programs
&& $(MAKE
) install
205 uninstall_programs
: dummy
206 @cd programs
&& $(MAKE
) uninstall
209 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) install) || exit
1; done
213 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) uninstall) || exit
1; done
216 @cd dlls
&& $(MAKE
) checklink
219 etags
`find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
222 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/man3w
223 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) man
); done
226 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/html
227 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) html
); done
230 $(RM
) wine libwine.so
.1.0 TAGS
233 $(RM
) config.
* Make.rules dlls
/Makedll.rules
include/config.h documentation
/wine.man documentation
/wine.conf.man
234 $(RM
) `find . \( -name Makefile -o -size 0 \) -print`
236 # We depend on configure above for checks, so we better don't use this rule.
237 #configure: configure.in
240 include/config.h.in
: configure.in
include/acconfig.h
241 autoheader
-l
include