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@
37 graphics
/enhmetafiledrv \
38 graphics
/metafiledrv \
65 DOCSUBDIRS
= documentation
69 # Stand-alone programs
74 # Programs that link with libwine
78 # Sub-directories to run make into
88 # Sub-directories to run make install into
89 INSTALLSUBDIRS
= $(DLLDIR
) $(DOCSUBDIRS
) $(INCSUBDIRS
)
91 # Sub-directories to run make lint into
92 LINTSUBDIRS
= $(LIBSUBDIRS
) $(DLLDIR
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
97 dlls
/advapi32
/advapi32.o \
98 dlls
/crtdll
/crtdll.o \
101 graphics
/graphics.o \
102 graphics
/enhmetafiledrv
/enhmetafiledrv.o \
103 graphics
/metafiledrv
/metafiledrv.o \
104 graphics
/win16drv
/win16drv.o \
115 resources
/resources.o \
116 scheduler
/scheduler.o \
123 DLLOBJS
= $(DLLS
:%=dlls
/lib
%.@LIBEXT@
)
125 EXTRA_OBJS
= $(LIBOBJS
)
127 EMU_TARGET
= @EMU_TARGET@
129 all: Make.rules
$(PROGRAMS
) $(LIBPROGRAMS
) lib
$(MODULE
).
$(LIBEXT
) $(DLLDIR
) $(EMU_TARGET
)
130 @echo
"Wine build complete."
132 LIBLINTS
= $(LIBOBJS
:.o
=.ln
)
133 EMULINTS
= $(EMUOBJS
:.o
=.ln
)
135 lint
:: llib-lwine.ln
$(EMULINTS
)
136 $(LINT
) $(ALLLINTFLAGS
) -L.
-lwine
$(EMULINTS
)
138 WINAPI_CHECK_EXTRA_FLAGS
= --global
142 Make.rules
: Make.rules.in configure
143 @echo
$? is newer than
'Make.rules', please rerun .
/configure
!
146 wine
: lib
$(MODULE
).
$(LIBEXT
) $(DLLDIR
) $(EMUOBJS
)
147 $(CC
) -o wine
$(EMUOBJS
) $(DLL_LINK
) $(LIBS
)
149 llib-lwine.ln
: $(LIBLINTS
)
150 $(LINT
) $(ALLLINTFLAGS
) -owine
$(LIBLINTS
)
152 install_so
: lib
$(MODULE
).so.
$(SOVERSION
)
153 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
154 $(INSTALL_PROGRAM
) lib
$(MODULE
).so.
$(SOVERSION
) $(libdir)/lib
$(MODULE
).so.
$(SOVERSION
)
155 cd
$(libdir) && $(RM
) lib
$(MODULE
).so
&& $(LN_S
) lib
$(MODULE
).so.
$(SOVERSION
) lib
$(MODULE
).so
157 install_a
: lib
$(MODULE
).a
158 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
159 $(INSTALL_DATA
) lib
$(MODULE
).a
$(libdir)/lib
$(MODULE
).a
162 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
163 $(INSTALL_PROGRAM
) wine
$(bindir)/wine
165 install:: $(PROGRAMS
) $(LIBPROGRAMS
) $(EMU_TARGET
:%=install_
%) $(LIBEXT
:%=install_
%)
166 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
167 $(INSTALL_PROGRAM
) server
/wineserver
$(bindir)/wineserver
168 $(INSTALL_PROGRAM
) loader
/dos
/dosmod
$(bindir)/dosmod
169 $(INSTALL_PROGRAM
) debugger
/winedbg
$(bindir)/winedbg
172 cd
$(libdir) && $(RM
) libwine.a libwine.so libwine.so.
$(SOVERSION
)
173 cd
$(bindir) && $(RM
) wine wineserver dosmod winedbg
175 lib
$(MODULE
).so.
$(SOVERSION
): $(OBJS
) Makefile.in Make.rules.in
176 $(LDSHARED
) $(OBJS
) -o
$@
178 lib
$(MODULE
).so
: lib
$(MODULE
).so.
$(SOVERSION
)
179 $(RM
) $@
&& $(LN_S
) lib
$(MODULE
).so.
$(SOVERSION
) $@
181 lib
$(MODULE
).a
: $(OBJS
) Makefile.in Make.rules.in
187 $(CC
) -o checklink
$(TOPSRCDIR
)/library
/checklink.c
-L.
-lwine
$(LIBS
) && $(RM
) checklink
189 $(EMUOBJS
) $(LIBOBJS
) $(DLLOBJS
) $(PROGRAMS
) $(LIBPROGRAMS
): $(TOOLSUBDIRS
) dummy
190 @cd
`dirname $@` && $(MAKE
) `basename $@`
192 $(DLLDIR
): $(TOOLSUBDIRS
) dummy
194 $(LIBPROGRAMS
): lib
$(MODULE
).
$(LIBEXT
) $(DLLDIR
)
196 $(LIBLINTS
) $(EMULINTS
): dummy
197 @cd
`dirname $@` && $(MAKE
) lint
199 install_programs
: dummy
200 @cd programs
&& $(MAKE
) install
202 uninstall_programs
: dummy
203 @cd programs
&& $(MAKE
) uninstall
206 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) install) || exit
1; done
210 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) uninstall) || exit
1; done
213 @cd dlls
&& $(MAKE
) checklink
216 etags
`find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
219 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/man3w
220 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) man
); done
223 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/html
224 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) html
); done
227 $(RM
) wine libwine.so
.1.0 TAGS
230 $(RM
) config.
* Make.rules dlls
/Makedll.rules
include/config.h documentation
/wine.man documentation
/wine.conf.man
231 $(RM
) `find . \( -name Makefile -o -size 0 \) -print`
233 # We depend on configure above for checks, so we better don't use this rule.
234 #configure: configure.in
237 include/config.h.in
: configure.in
include/acconfig.h
238 autoheader
-l
include