Sweden-Number/Makefile.in

191 lines
4.6 KiB
Makefile

# This Makefile understands the following targets:
#
# all (default): build wine
# clean: remove all intermediate files
# distclean: also remove all files created by configure
# test: run tests
# testclean: clean test results to force running all tests again
# install: install everything
# uninstall: uninstall everything
# depend: create the dependencies
# etags: create a TAGS file for Emacs.
# manpages: compile manpages for Wine API
#
# Directories
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = .
SRCDIR = @srcdir@
VPATH = @srcdir@
LIBEXT = @LIBEXT@
LDCONFIG = @LDCONFIG@
MODULE = wine
IMPORTS = ntdll.dll
# Stand-alone programs
PROGRAMS = \
server/wineserver
# Programs that link with libwine
LIBPROGRAMS = \
debugger/winedbg \
programs/wineconsole/wineconsole
# Libraries (not dlls) to build
LIBRARIES = \
library/libwine.$(LIBEXT) \
ole/libwine_uuid.a \
tsx11/libwine_tsx11.$(LIBEXT) \
unicode/libwine_unicode.$(LIBEXT)
# Dlls that we need to link against (should go away)
LINKABLE_DLLS = winspool.drv user32.dll gdi32.dll kernel32.dll ntdll.dll
# Libraries symlinks to create at the top level
LIBSYMLINKS = \
$(LINKABLE_DLLS:%=lib%.$(LIBEXT)) \
libwine.$(LIBEXT) \
libwine_tsx11.$(LIBEXT) \
libwine_unicode.$(LIBEXT) \
libwine_uuid.a
# Sub-directories to run make depend/clean into
SUBDIRS = \
$(INSTALLSUBDIRS) \
libtest \
miscemu \
programs
# Sub-directories to run make install into
INSTALLSUBDIRS = \
debugger \
dlls \
documentation \
include \
library \
ole \
programs/wineconsole \
server \
tools \
tsx11 \
unicode
# Sub-directories to run make test into
TESTSUBDIRS = \
programs/winetest \
dlls
EMUOBJS = \
miscemu/miscemu.o
all: Make.rules $(PROGRAMS) $(LIBPROGRAMS) $(LIBSYMLINKS) wine
@echo "Wine build complete."
WINAPI_CHECK_EXTRA_FLAGS = --global
@MAKE_RULES@
Make.rules: Make.rules.in configure
@echo $? is newer than 'Make.rules', please rerun ./configure!
@exit 1
wine: $(EMUOBJS) $(IMPORTS:%=lib%.$(LIBEXT)) library/libwine.$(LIBEXT) unicode/libwine_unicode.$(LIBEXT)
$(CC) -o wine $(EMUOBJS) -L. $(IMPORTS:%=-l%) $(LIBWINE) $(LIBUNICODE) $(LIBS) $(LDFLAGS)
install_wine: dummy
[ -d $(bindir) ] || $(MKDIR) $(bindir)
$(INSTALL_PROGRAM) wine $(bindir)/wine
install:: all install_wine $(INSTALLSUBDIRS:%=%/__install__)
-$(LDCONFIG)
uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__)
cd $(bindir) && $(RM) wine
$(EMUOBJS) $(PROGRAMS) $(LIBPROGRAMS) $(LIBRARIES): dummy
@cd `dirname $@` && $(MAKE) `basename $@`
# Symlinks to libraries that we need to link against
libwine.$(LIBEXT): library/libwine.$(LIBEXT)
$(RM) $@ && $(LN_S) library/libwine.$(LIBEXT) $@
libwine_tsx11.$(LIBEXT): tsx11/libwine_tsx11.$(LIBEXT)
$(RM) $@ && $(LN_S) tsx11/libwine_tsx11.$(LIBEXT) $@
libwine_unicode.$(LIBEXT): unicode/libwine_unicode.$(LIBEXT)
$(RM) $@ && $(LN_S) unicode/libwine_unicode.$(LIBEXT) $@
libwine_uuid.a: ole/libwine_uuid.a
$(RM) $@ && $(LN_S) ole/libwine_uuid.a $@
libwinspool.drv.$(LIBEXT): dlls/winspool.drv$(DLLEXT)
$(RM) $@ && $(LN_S) dlls/winspool.drv$(DLLEXT) $@
libuser32.dll.$(LIBEXT): dlls/user32.dll$(DLLEXT)
$(RM) $@ && $(LN_S) dlls/user32.dll$(DLLEXT) $@
libgdi32.dll.$(LIBEXT): dlls/gdi32.dll$(DLLEXT)
$(RM) $@ && $(LN_S) dlls/gdi32.dll$(DLLEXT) $@
libkernel32.dll.$(LIBEXT): dlls/kernel32.dll$(DLLEXT)
$(RM) $@ && $(LN_S) dlls/kernel32.dll$(DLLEXT) $@
libntdll.dll.$(LIBEXT): dlls/ntdll.dll$(DLLEXT)
$(RM) $@ && $(LN_S) dlls/ntdll.dll$(DLLEXT) $@
$(LINKABLE_DLLS:%=dlls/%$(DLLEXT)): dlls
# Dependencies between directories
$(PROGRAMS): tools
$(EMUOBJS): tools dlls
$(LIBPROGRAMS): tools dlls wine
server tools: unicode/libwine_unicode.$(LIBEXT)
dlls: tools $(LIBRARIES)
checklink::
$(CC) -o checklink $(TOPSRCDIR)/library/checklink.c $(LIBWINE) $(LIBS) && $(RM) checklink
install_programs: dummy
@cd programs && $(MAKE) install
uninstall_programs: dummy
@cd programs && $(MAKE) uninstall
checklink::
@cd dlls && $(MAKE) checklink
@cd debugger && $(MAKE) checklink
test_environment: dummy
@cd programs/winetest && $(MAKE) all
$(TESTSUBDIRS:%=%/__test__): test_environment
check test:: $(TESTSUBDIRS:%=%/__test__)
TAGS etags:
etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
manpages:
-$(MKDIR) $(TOPOBJDIR)/documentation/man3w
for i in $(SUBDIRS); do (cd $$i && $(MAKE) man); done
htmlpages:
-$(MKDIR) $(TOPOBJDIR)/documentation/html
for i in $(SUBDIRS); do (cd $$i && $(MAKE) html); done
clean::
$(RM) wine
distclean: clean
$(RM) config.* TAGS Make.rules dlls/Makedll.rules programs/Makeprog.rules include/config.h
$(RM) `find . \( -name Makefile -o -size 0 \) -print`
### Dependencies: