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 # Sub-directories to run make depend/clean into
46 graphics
/enhmetafiledrv \
47 graphics
/metafiledrv \
72 # Sub-directories to run make install into
84 dlls
/advapi32
/advapi32.o \
88 graphics
/enhmetafiledrv
/enhmetafiledrv.o \
89 graphics
/metafiledrv
/metafiledrv.o \
90 graphics
/win16drv
/win16drv.o \
101 resources
/resources.o \
102 scheduler
/scheduler.o \
110 DLLOBJS
= $(DLLS
:%=dlls
/lib
%.@LIBEXT@
)
112 EXTRA_OBJS
= $(LIBOBJS
)
114 all: Make.rules
$(PROGRAMS
) $(LIBPROGRAMS
) wine
115 @echo
"Wine build complete."
117 LIBLINTS
= $(LIBOBJS
:.o
=.ln
)
118 EMULINTS
= $(EMUOBJS
:.o
=.ln
)
120 lint
:: llib-lwine.ln
$(EMULINTS
)
121 $(LINT
) $(ALLLINTFLAGS
) -L.
-lwine
$(EMULINTS
)
123 WINAPI_CHECK_EXTRA_FLAGS
= --global
127 Make.rules
: Make.rules.in configure
128 @echo
$? is newer than
'Make.rules', please rerun .
/configure
!
131 wine
: lib
$(MODULE
).
$(LIBEXT
) $(DLLDIR
) $(EMUOBJS
)
132 $(CC
) -o wine
$(EMUOBJS
) $(DLL_LINK
) $(LIBS
)
134 llib-lwine.ln
: $(LIBLINTS
)
135 $(LINT
) $(ALLLINTFLAGS
) -owine
$(LIBLINTS
)
137 install_so
: lib
$(MODULE
).so.
$(SOVERSION
)
138 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
139 $(INSTALL_PROGRAM
) lib
$(MODULE
).so.
$(SOVERSION
) $(libdir)/lib
$(MODULE
).so.
$(SOVERSION
)
140 cd
$(libdir) && $(RM
) lib
$(MODULE
).so
&& $(LN_S
) lib
$(MODULE
).so.
$(SOVERSION
) lib
$(MODULE
).so
142 install_a
: lib
$(MODULE
).a
143 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
144 $(INSTALL_DATA
) lib
$(MODULE
).a
$(libdir)/lib
$(MODULE
).a
146 install:: all $(LIBEXT
:%=install_
%) $(INSTALLSUBDIRS
:%=%/__install__
)
147 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
148 $(INSTALL_PROGRAM
) wine
$(bindir)/wine
149 $(INSTALL_PROGRAM
) loader
/dos
/dosmod
$(bindir)/dosmod
152 uninstall:: $(INSTALLSUBDIRS
:%=%/__uninstall__
)
153 cd
$(libdir) && $(RM
) libwine.a libwine.so libwine.so.
$(SOVERSION
)
154 cd
$(bindir) && $(RM
) wine dosmod
156 lib
$(MODULE
).so.
$(SOVERSION
): $(OBJS
) Makefile.in Make.rules.in
157 $(LDSHARED
) $(OBJS
) -o
$@
159 lib
$(MODULE
).so
: lib
$(MODULE
).so.
$(SOVERSION
)
160 $(RM
) $@
&& $(LN_S
) lib
$(MODULE
).so.
$(SOVERSION
) $@
162 lib
$(MODULE
).a
: $(OBJS
) Makefile.in Make.rules.in
167 $(EMUOBJS
) $(LIBOBJS
) $(DLLOBJS
) $(PROGRAMS
) $(LIBPROGRAMS
): dummy
168 @cd
`dirname $@` && $(MAKE
) `basename $@`
170 $(EMUOBJS
) $(LIBOBJS
) $(DLLOBJS
) $(PROGRAMS
) $(DLLDIR
): tools
172 $(LIBPROGRAMS
): tools dlls lib
$(MODULE
).
$(LIBEXT
)
174 $(LIBLINTS
) $(EMULINTS
): dummy
175 @cd
`dirname $@` && $(MAKE
) lint
178 $(CC
) -o checklink
$(TOPSRCDIR
)/library
/checklink.c
-L.
-lwine
$(LIBS
) && $(RM
) checklink
180 install_programs
: dummy
181 @cd programs
&& $(MAKE
) install
183 uninstall_programs
: dummy
184 @cd programs
&& $(MAKE
) uninstall
187 @cd dlls
&& $(MAKE
) checklink
190 etags
`find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
193 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/man3w
194 for i in
$(SUBDIRS
); do
(cd
$$i && $(MAKE
) man
); done
197 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/html
198 for i in
$(SUBDIRS
); do
(cd
$$i && $(MAKE
) html
); done
201 $(RM
) wine libwine.so
.1.0 TAGS
204 $(RM
) config.
* Make.rules dlls
/Makedll.rules
include/config.h documentation
/wine.man documentation
/wine.conf.man
205 $(RM
) `find . \( -name Makefile -o -size 0 \) -print`
207 # We depend on configure above for checks, so we better don't use this rule.
208 #configure: configure.in
211 include/config.h.in
: configure.in
include/acconfig.h
212 autoheader
-l
include