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
67 # Sub-directories to run make install into
90 scheduler
/scheduler.o \
96 DLLOBJS
= $(DLLS
:%=dlls
/lib
%.@LIBEXT@
)
98 EXTRA_OBJS
= $(LIBOBJS
)
100 all: Make.rules
$(PROGRAMS
) $(LIBPROGRAMS
) wine
101 @echo
"Wine build complete."
103 LIBLINTS
= $(LIBOBJS
:.o
=.ln
)
104 EMULINTS
= $(EMUOBJS
:.o
=.ln
)
106 lint
:: llib-lwine.ln
$(EMULINTS
)
107 $(LINT
) $(ALLLINTFLAGS
) -L.
-lwine
$(EMULINTS
)
109 WINAPI_CHECK_EXTRA_FLAGS
= --global
113 Make.rules
: Make.rules.in configure
114 @echo
$? is newer than
'Make.rules', please rerun .
/configure
!
117 wine
: libwine.
$(LIBEXT
) libwine_unicode.
$(LIBEXT
) dlls
$(EMUOBJS
)
118 $(CC
) -o wine
$(EMUOBJS
) $(DLL_LINK
) $(LIBS
)
120 llib-lwine.ln
: $(LIBLINTS
)
121 $(LINT
) $(ALLLINTFLAGS
) -owine
$(LIBLINTS
)
123 install_so
: libwine.so.
$(SOVERSION
)
124 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
125 $(INSTALL_PROGRAM
) libwine.so.
$(SOVERSION
) $(libdir)/libwine.so.
$(SOVERSION
)
126 cd
$(libdir) && $(RM
) libwine.so
&& $(LN_S
) libwine.so.
$(SOVERSION
) libwine.so
129 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
130 $(INSTALL_DATA
) libwine.a
$(libdir)/libwine.a
132 install:: all $(LIBEXT
:%=install_
%) $(INSTALLSUBDIRS
:%=%/__install__
)
133 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
134 $(INSTALL_PROGRAM
) wine
$(bindir)/wine
135 $(INSTALL_PROGRAM
) loader
/dos
/dosmod
$(bindir)/dosmod
138 uninstall:: $(INSTALLSUBDIRS
:%=%/__uninstall__
)
139 cd
$(libdir) && $(RM
) libwine.a libwine.so libwine.so.
$(SOVERSION
)
140 cd
$(bindir) && $(RM
) wine dosmod
142 libwine.so.
$(SOVERSION
): $(OBJS
) Makefile.in Make.rules.in
143 $(LDSHARED
) $(OBJS
) -o
$@
145 libwine.so
: libwine.so.
$(SOVERSION
)
146 $(RM
) $@
&& $(LN_S
) libwine.so.
$(SOVERSION
) $@
148 libwine.a
: $(OBJS
) Makefile.in Make.rules.in
153 $(EMUOBJS
) $(LIBOBJS
) $(DLLOBJS
) $(PROGRAMS
) $(LIBPROGRAMS
) $(LIBRARIES
): dummy
154 @cd
`dirname $@` && $(MAKE
) `basename $@`
156 # Dependencies between directories
158 $(EMUOBJS
) $(LIBOBJS
) $(DLLOBJS
) $(PROGRAMS
) dlls
: tools
160 $(LIBPROGRAMS
): tools dlls libwine.
$(LIBEXT
) libwine_unicode.
$(LIBEXT
)
162 server tools dlls
: libwine_unicode.
$(LIBEXT
)
164 libwine_unicode.
$(LIBEXT
): unicode
/libwine_unicode.
$(LIBEXT
)
165 $(RM
) $@
&& $(LN_S
) unicode
/libwine_unicode.
$(LIBEXT
) $@
167 $(LIBLINTS
) $(EMULINTS
): dummy
168 @cd
`dirname $@` && $(MAKE
) lint
171 $(CC
) -o checklink
$(TOPSRCDIR
)/library
/checklink.c
-L.
-lwine
-lwine_unicode
$(LIBS
) && $(RM
) checklink
173 install_programs
: dummy
174 @cd programs
&& $(MAKE
) install
176 uninstall_programs
: dummy
177 @cd programs
&& $(MAKE
) uninstall
180 @cd dlls
&& $(MAKE
) checklink
183 etags
`find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
186 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/man3w
187 for i in
$(SUBDIRS
); do
(cd
$$i && $(MAKE
) man
); done
190 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/html
191 for i in
$(SUBDIRS
); do
(cd
$$i && $(MAKE
) html
); done
194 $(RM
) wine libwine.so.
$(SOVERSION
) TAGS
197 $(RM
) config.
* Make.rules dlls
/Makedll.rules
include/config.h documentation
/wine.man documentation
/wine.conf.man
198 $(RM
) `find . \( -name Makefile -o -size 0 \) -print`
200 # We depend on configure above for checks, so we better don't use this rule.
201 #configure: configure.in
204 include/config.h.in
: configure.in
include/acconfig.h
205 autoheader
-l
include