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@
26 # Stand-alone programs
31 # Programs that link with libwine
35 # Libraries (not dlls) to build
37 unicode
/libwine_unicode.
$(LIBEXT
)
39 # Sub-directories to run make depend/clean into
49 graphics
/enhmetafiledrv \
50 graphics
/metafiledrv \
75 # Sub-directories to run make install into
91 graphics
/enhmetafiledrv
/enhmetafiledrv.o \
92 graphics
/metafiledrv
/metafiledrv.o \
93 graphics
/win16drv
/win16drv.o \
104 resources
/resources.o \
105 scheduler
/scheduler.o \
112 DLLOBJS
= $(DLLS
:%=dlls
/lib
%.@LIBEXT@
)
114 EXTRA_OBJS
= $(LIBOBJS
)
116 all: Make.rules
$(PROGRAMS
) $(LIBPROGRAMS
) wine
117 @echo
"Wine build complete."
119 LIBLINTS
= $(LIBOBJS
:.o
=.ln
)
120 EMULINTS
= $(EMUOBJS
:.o
=.ln
)
122 lint
:: llib-lwine.ln
$(EMULINTS
)
123 $(LINT
) $(ALLLINTFLAGS
) -L.
-lwine
$(EMULINTS
)
125 WINAPI_CHECK_EXTRA_FLAGS
= --global
129 Make.rules
: Make.rules.in configure
130 @echo
$? is newer than
'Make.rules', please rerun .
/configure
!
133 wine
: libwine.
$(LIBEXT
) libwine_unicode.
$(LIBEXT
) dlls
$(EMUOBJS
)
134 $(CC
) -o wine
$(EMUOBJS
) $(DLL_LINK
) $(LIBS
)
136 llib-lwine.ln
: $(LIBLINTS
)
137 $(LINT
) $(ALLLINTFLAGS
) -owine
$(LIBLINTS
)
139 install_so
: libwine.so.
$(SOVERSION
)
140 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
141 $(INSTALL_PROGRAM
) libwine.so.
$(SOVERSION
) $(libdir)/libwine.so.
$(SOVERSION
)
142 cd
$(libdir) && $(RM
) libwine.so
&& $(LN_S
) libwine.so.
$(SOVERSION
) libwine.so
145 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
146 $(INSTALL_DATA
) libwine.a
$(libdir)/libwine.a
148 install:: all $(LIBEXT
:%=install_
%) $(INSTALLSUBDIRS
:%=%/__install__
)
149 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
150 $(INSTALL_PROGRAM
) wine
$(bindir)/wine
151 $(INSTALL_PROGRAM
) loader
/dos
/dosmod
$(bindir)/dosmod
154 uninstall:: $(INSTALLSUBDIRS
:%=%/__uninstall__
)
155 cd
$(libdir) && $(RM
) libwine.a libwine.so libwine.so.
$(SOVERSION
)
156 cd
$(bindir) && $(RM
) wine dosmod
158 libwine.so.
$(SOVERSION
): $(OBJS
) Makefile.in Make.rules.in
159 $(LDSHARED
) $(OBJS
) -o
$@
161 libwine.so
: libwine.so.
$(SOVERSION
)
162 $(RM
) $@
&& $(LN_S
) libwine.so.
$(SOVERSION
) $@
164 libwine.a
: $(OBJS
) Makefile.in Make.rules.in
169 $(EMUOBJS
) $(LIBOBJS
) $(DLLOBJS
) $(PROGRAMS
) $(LIBPROGRAMS
) $(LIBRARIES
): dummy
170 @cd
`dirname $@` && $(MAKE
) `basename $@`
172 # Dependencies between directories
174 $(EMUOBJS
) $(LIBOBJS
) $(DLLOBJS
) $(PROGRAMS
) dlls
: tools
176 $(LIBPROGRAMS
): tools dlls libwine.
$(LIBEXT
) libwine_unicode.
$(LIBEXT
)
178 server tools dlls
: libwine_unicode.
$(LIBEXT
)
180 libwine_unicode.
$(LIBEXT
): unicode
/libwine_unicode.
$(LIBEXT
)
181 $(RM
) $@
&& $(LN_S
) unicode
/libwine_unicode.
$(LIBEXT
) $@
183 $(LIBLINTS
) $(EMULINTS
): dummy
184 @cd
`dirname $@` && $(MAKE
) lint
187 $(CC
) -o checklink
$(TOPSRCDIR
)/library
/checklink.c
-L.
-lwine
-lwine_unicode
$(LIBS
) && $(RM
) checklink
189 install_programs
: dummy
190 @cd programs
&& $(MAKE
) install
192 uninstall_programs
: dummy
193 @cd programs
&& $(MAKE
) uninstall
196 @cd dlls
&& $(MAKE
) checklink
199 etags
`find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
202 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/man3w
203 for i in
$(SUBDIRS
); do
(cd
$$i && $(MAKE
) man
); done
206 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/html
207 for i in
$(SUBDIRS
); do
(cd
$$i && $(MAKE
) html
); done
210 $(RM
) wine libwine.so.
$(SOVERSION
) TAGS
213 $(RM
) config.
* Make.rules dlls
/Makedll.rules
include/config.h documentation
/wine.man documentation
/wine.conf.man
214 $(RM
) `find . \( -name Makefile -o -size 0 \) -print`
216 # We depend on configure above for checks, so we better don't use this rule.
217 #configure: configure.in
220 include/config.h.in
: configure.in
include/acconfig.h
221 autoheader
-l
include