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 \
103 graphics
/graphics.o \
104 graphics
/enhmetafiledrv
/enhmetafiledrv.o \
105 graphics
/metafiledrv
/metafiledrv.o \
106 graphics
/win16drv
/win16drv.o \
117 resources
/resources.o \
118 scheduler
/scheduler.o \
125 DLLOBJS
= $(DLLS
:%=dlls
/lib
%.@LIBEXT@
)
127 EXTRA_OBJS
= $(LIBOBJS
)
129 EMU_TARGET
= @EMU_TARGET@
131 all: Make.rules
$(PROGRAMS
) $(LIBPROGRAMS
) lib
$(MODULE
).
$(LIBEXT
) $(DLLDIR
) $(EMU_TARGET
)
132 @echo
"Wine build complete."
134 LIBLINTS
= $(LIBOBJS
:.o
=.ln
)
135 EMULINTS
= $(EMUOBJS
:.o
=.ln
)
137 lint
:: llib-lwine.ln
$(EMULINTS
)
138 $(LINT
) $(ALLLINTFLAGS
) -L.
-lwine
$(EMULINTS
)
140 WINAPI_CHECK_EXTRA_FLAGS
= --global
144 Make.rules
: Make.rules.in configure
145 @echo
$? is newer than
'Make.rules', please rerun .
/configure
!
148 wine
: lib
$(MODULE
).
$(LIBEXT
) $(DLLDIR
) $(EMUOBJS
)
149 $(CC
) -o wine
$(EMUOBJS
) $(DLL_LINK
) $(LIBS
)
151 llib-lwine.ln
: $(LIBLINTS
)
152 $(LINT
) $(ALLLINTFLAGS
) -owine
$(LIBLINTS
)
154 install_so
: lib
$(MODULE
).so.
$(SOVERSION
)
155 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
156 $(INSTALL_PROGRAM
) lib
$(MODULE
).so.
$(SOVERSION
) $(libdir)/lib
$(MODULE
).so.
$(SOVERSION
)
157 cd
$(libdir) && $(RM
) lib
$(MODULE
).so
&& $(LN_S
) lib
$(MODULE
).so.
$(SOVERSION
) lib
$(MODULE
).so
159 install_a
: lib
$(MODULE
).a
160 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
161 $(INSTALL_DATA
) lib
$(MODULE
).a
$(libdir)/lib
$(MODULE
).a
164 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
165 $(INSTALL_PROGRAM
) wine
$(bindir)/wine
167 install:: $(PROGRAMS
) $(LIBPROGRAMS
) $(EMU_TARGET
:%=install_
%) $(LIBEXT
:%=install_
%)
168 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
169 $(INSTALL_PROGRAM
) server
/wineserver
$(bindir)/wineserver
170 $(INSTALL_PROGRAM
) loader
/dos
/dosmod
$(bindir)/dosmod
171 $(INSTALL_PROGRAM
) debugger
/winedbg
$(bindir)/winedbg
174 cd
$(libdir) && $(RM
) libwine.a libwine.so libwine.so.
$(SOVERSION
)
175 cd
$(bindir) && $(RM
) wine wineserver dosmod winedbg
177 lib
$(MODULE
).so.
$(SOVERSION
): $(OBJS
) Makefile.in Make.rules.in
178 $(LDSHARED
) $(OBJS
) -o
$@
180 lib
$(MODULE
).so
: lib
$(MODULE
).so.
$(SOVERSION
)
181 $(RM
) $@
&& $(LN_S
) lib
$(MODULE
).so.
$(SOVERSION
) $@
183 lib
$(MODULE
).a
: $(OBJS
) Makefile.in Make.rules.in
189 $(CC
) -o checklink
$(TOPSRCDIR
)/library
/checklink.c
-L.
-lwine
$(LIBS
) && $(RM
) checklink
191 $(EMUOBJS
) $(LIBOBJS
) $(DLLOBJS
) $(PROGRAMS
) $(LIBPROGRAMS
): $(TOOLSUBDIRS
) dummy
192 @cd
`dirname $@` && $(MAKE
) `basename $@`
194 $(DLLDIR
): $(TOOLSUBDIRS
) dummy
196 $(LIBPROGRAMS
): lib
$(MODULE
).
$(LIBEXT
) $(DLLDIR
)
198 $(LIBLINTS
) $(EMULINTS
): dummy
199 @cd
`dirname $@` && $(MAKE
) lint
201 install_programs
: dummy
202 @cd programs
&& $(MAKE
) install
204 uninstall_programs
: dummy
205 @cd programs
&& $(MAKE
) uninstall
208 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) install) || exit
1; done
212 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) uninstall) || exit
1; done
215 @cd dlls
&& $(MAKE
) checklink
218 etags
`find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
221 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/man3w
222 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) man
); done
225 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/html
226 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) html
); done
229 $(RM
) wine libwine.so
.1.0 TAGS
232 $(RM
) config.
* Make.rules dlls
/Makedll.rules
include/config.h documentation
/wine.man documentation
/wine.conf.man
233 $(RM
) `find . \( -name Makefile -o -size 0 \) -print`
235 # We depend on configure above for checks, so we better don't use this rule.
236 #configure: configure.in
239 include/config.h.in
: configure.in
include/acconfig.h
240 autoheader
-l
include