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 \
67 DOCSUBDIRS
= documentation
71 # Stand-alone programs
76 # Programs that link with libwine
80 # Sub-directories to run make into
90 # Sub-directories to run make install into
91 INSTALLSUBDIRS
= $(DLLDIR
) $(DOCSUBDIRS
) $(INCSUBDIRS
)
93 # Sub-directories to run make lint into
94 LINTSUBDIRS
= $(LIBSUBDIRS
) $(DLLDIR
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
99 dlls
/advapi32
/advapi32.o \
100 dlls
/crtdll
/crtdll.o \
101 dlls
/display
/display.o \
105 graphics
/graphics.o \
106 graphics
/enhmetafiledrv
/enhmetafiledrv.o \
107 graphics
/metafiledrv
/metafiledrv.o \
108 graphics
/psdrv
/psdrv.o \
109 graphics
/win16drv
/win16drv.o \
120 resources
/resources.o \
121 scheduler
/scheduler.o \
128 DLLOBJS
= $(DLLS
:%=dlls
/lib
%.@LIBEXT@
)
130 EXTRA_OBJS
= $(LIBOBJS
)
132 EMU_TARGET
= @EMU_TARGET@
134 all: Make.rules
$(PROGRAMS
) $(LIBPROGRAMS
) lib
$(MODULE
).
$(LIBEXT
) $(DLLDIR
) $(EMU_TARGET
)
135 @echo
"Wine build complete."
137 LIBLINTS
= $(LIBOBJS
:.o
=.ln
)
138 EMULINTS
= $(EMUOBJS
:.o
=.ln
)
140 lint
:: llib-lwine.ln
$(EMULINTS
)
141 $(LINT
) $(ALLLINTFLAGS
) -L.
-lwine
$(EMULINTS
)
143 WINAPI_CHECK_EXTRA_FLAGS
= --global
147 Make.rules
: Make.rules.in configure
148 @echo
$? is newer than
'Make.rules', please rerun .
/configure
!
151 wine
: lib
$(MODULE
).
$(LIBEXT
) $(DLLDIR
) $(EMUOBJS
)
152 $(CC
) -o wine
$(EMUOBJS
) $(DLL_LINK
) $(LIBS
)
154 llib-lwine.ln
: $(LIBLINTS
)
155 $(LINT
) $(ALLLINTFLAGS
) -owine
$(LIBLINTS
)
157 install_so
: lib
$(MODULE
).so.
$(SOVERSION
)
158 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
159 $(INSTALL_PROGRAM
) lib
$(MODULE
).so.
$(SOVERSION
) $(libdir)/lib
$(MODULE
).so.
$(SOVERSION
)
160 cd
$(libdir) && $(RM
) lib
$(MODULE
).so
&& $(LN_S
) lib
$(MODULE
).so.
$(SOVERSION
) lib
$(MODULE
).so
162 install_a
: lib
$(MODULE
).a
163 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
164 $(INSTALL_DATA
) lib
$(MODULE
).a
$(libdir)/lib
$(MODULE
).a
167 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
168 $(INSTALL_PROGRAM
) wine
$(bindir)/wine
170 install:: $(PROGRAMS
) $(LIBPROGRAMS
) $(EMU_TARGET
:%=install_
%) $(LIBEXT
:%=install_
%)
171 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
172 $(INSTALL_PROGRAM
) server
/wineserver
$(bindir)/wineserver
173 $(INSTALL_PROGRAM
) loader
/dos
/dosmod
$(bindir)/dosmod
174 $(INSTALL_PROGRAM
) debugger
/winedbg
$(bindir)/winedbg
177 cd
$(libdir) && $(RM
) libwine.a libwine.so libwine.so.
$(SOVERSION
)
178 cd
$(bindir) && $(RM
) wine wineserver dosmod winedbg
180 lib
$(MODULE
).so.
$(SOVERSION
): $(OBJS
) Makefile.in Make.rules.in
181 $(LDSHARED
) $(OBJS
) -o
$@
183 lib
$(MODULE
).so
: lib
$(MODULE
).so.
$(SOVERSION
)
184 $(RM
) $@
&& $(LN_S
) lib
$(MODULE
).so.
$(SOVERSION
) $@
186 lib
$(MODULE
).a
: $(OBJS
) Makefile.in Make.rules.in
192 $(CC
) -o checklink
$(TOPSRCDIR
)/library
/checklink.c
-L.
-lwine
$(LIBS
) && $(RM
) checklink
194 $(EMUOBJS
) $(LIBOBJS
) $(DLLOBJS
) $(PROGRAMS
) $(LIBPROGRAMS
): $(TOOLSUBDIRS
) dummy
195 @cd
`dirname $@` && $(MAKE
) `basename $@`
197 $(DLLDIR
): $(TOOLSUBDIRS
) dummy
199 $(LIBPROGRAMS
): lib
$(MODULE
).
$(LIBEXT
) $(DLLDIR
)
201 $(LIBLINTS
) $(EMULINTS
): dummy
202 @cd
`dirname $@` && $(MAKE
) lint
204 install_programs
: dummy
205 @cd programs
&& $(MAKE
) install
207 uninstall_programs
: dummy
208 @cd programs
&& $(MAKE
) uninstall
211 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) install) || exit
1; done
215 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) uninstall) || exit
1; done
218 @cd dlls
&& $(MAKE
) checklink
221 etags
`find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
224 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/man3w
225 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) man
); done
228 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/html
229 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) html
); done
232 $(RM
) wine libwine.so
.1.0 TAGS
235 $(RM
) config.
* Make.rules dlls
/Makedll.rules
include/config.h documentation
/wine.man documentation
/wine.conf.man
236 $(RM
) `find . \( -name Makefile -o -size 0 \) -print`
238 # We depend on configure above for checks, so we better don't use this rule.
239 #configure: configure.in
242 include/config.h.in
: configure.in
include/acconfig.h
243 autoheader
-l
include