2
2
# -*- mode: makefile; coding: utf-8 -*-
3
# Copyright © 2003 Jonas Smedegaard <dr@jones.dk>
3
# Copyright © 2003-2008 Jonas Smedegaard <dr@jones.dk>
5
# See debian/README.cdbs-tweaks for info on local overrides
6
ifneq (,$(findstring init,$(DEB_BUILD_OPTIONS)))
7
#DEB_AUTO_UPDATE_ACLOCAL = 1.9
8
#DEB_AUTO_UPDATE_AUTOHEADER = 2.50
9
#DEB_AUTO_UPDATE_AUTOCONF = 2.50
11
include debian/cdbs/1/rules/upstream-tarball.mk
12
include debian/cdbs/1/rules/copyright-check.mk
13
include /usr/share/cdbs/1/rules/patchsys-quilt.mk
14
include /usr/share/cdbs/1/class/autotools.mk
15
include debian/cdbs/1/rules/buildinfo.mk
16
include /usr/share/cdbs/1/rules/debhelper.mk
18
DEB_UPSTREAM_URL = http://basilisk.cebix.net/downloads
19
DEB_UPSTREAM_PACKAGE = BasiliskII_src_15012002
20
DEB_UPSTREAM_TARBALL_VERSION := $(shell perl -e '$$_ = "$(DEB_UPSTREAM_VERSION)"; s/^(.*)\.(\d{4})(\d{2})(\d{2})$$/$$4$$3$$2/; print;')
21
DEB_UPSTREAM_TARBALL_BASENAME = $(DEB_UPSTREAM_PACKAGE)_$(cdbs_upstream_tarball_version_mangled)
22
#DEB_UPSTREAM_TARBALL_MD5 =
5
24
DEB_SRCDIR = src/Unix
7
include /usr/share/cdbs/1/rules/debhelper.mk
9
# Use autotools-vars.mk from CVS to avoid cross-compiling on same host
10
include debian/cdbs/autotools-vars.mk
12
include /usr/share/cdbs/1/class/autotools.mk
14
DEB_CONFIGURE_USER_FLAGS = --enable-xf86-dga --disable-fbdev-dga
16
# Don't know why, but upstream added this and it seems to be needed
25
DEB_CONFIGURE_USER_FLAGS = --disable-rpath --enable-sdl-video --enable-sdl-audio
27
# JIT compiler only supported on i386 and ia64
28
#DEB_CONFIGURE_USER_FLAGS += --enable-jit-compiler
30
# Suppress excess and seemingly non-fatal warnings
31
CFLAGS += -Wno-unused-variable -Wno-unused-label -Wno-missing-braces -Wno-parentheses
32
CXXFLAGS += -Wno-unused-variable -Wno-unused-label -Wno-missing-braces -Wno-parentheses
34
# Upstream added this, but it seems to work fine without it
17
35
#CXXFLAGS += -fno-merge-constants
19
37
ifeq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
20
38
DEB_CONFIGURE_USER_FLAGS += --without-mon
23
# We have no tests to run
24
DEB_MAKE_CHECK_TARGET :=
26
41
DEB_INSTALL_DOCS_ALL += TECH
28
binary-predeb/basilisk2::
31
# These are only used manually to (re)generate/remove automade files.
32
DEB_PHONY_RULES += ultraclean autogen
42
DEB_INSTALL_CHANGELOGS_ALL = ChangeLog.cvs
43
DEB_INSTALL_EXAMPLES_basilisk2 = $(DEB_SRCDIR)/Linux/* $(DEB_SRCDIR)/tunconfig
45
# tunconfig will be installed as example file only
46
binary-post-install/basilisk2::
47
rm -f debian/$(cdbs_curpkg)/usr/share/BasiliskII/tunconfig
49
# Initialize autotools in CVS snapshot
50
## FIXME: For some odd reason config.h gets deleted so these needs to
51
## run at every build instead of once :-(
52
ifneq (,$(findstring init,$(DEB_BUILD_OPTIONS)))
53
pre-build clean:: $(DEB_SRCDIR)/configure
55
$(DEB_SRCDIR)/configure: autogen
34
58
-$(MAKE) -C src/Unix distclean
35
cd src/Unix && rm -f config.h.in aclocal.m4 configure config.log ltmain.sh missing
36
cd src/Unix && rm -rf autom4te.cache
59
cd $(DEB_SRCDIR) && rm -f config.h.in aclocal.m4 configure config.log ltmain.sh missing
38
61
autogen: ultraclean
39
cd src/Unix && NO_CONFIGURE=naturligvis ./autogen.sh
62
cd $(DEB_SRCDIR) && ACLOCAL_FLAGS="-I m4" NO_CONFIGURE="yes" ./autogen.sh
63
cd $(DEB_SRCDIR) && rm -rf autom4te.cache
65
DEB_PHONY_RULES += ultraclean autogen
68
# Needed by upstream build process
69
CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), libgtk2.0-dev, libesd0-dev, libsdl-dev, libxxf86dga-dev, libxxf86vm-dev
71
# Merge duplicate build-dependencies
72
CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bcdbs (>= 0.4.39)/ s/ *,* *\bcdbs (>= \(0.4.23-1.1\|0.4.27-1\)) *,* */, /g' -e 's/^ *, *//' -e 's/ *, *$$//')