1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
|
#!/usr/bin/make -f
export DH_OPTIONS
DEB_HOST_ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null)
ifeq ($(DEB_HOST_ARCH),i386)
use_asm386=yes
else
use_asm386=no
endif
CFLAGS := -fPIC -DDEBUG=1 -I/usr/include/lua40
ifneq (,$(findstring functions,$(CLAN_BUILD_OPTIONS)))
CFLAGS += -ffunction-sections
endif
ifneq (,$(findstring "/$(DEB_HOST_ARCH)/","/hppa/mipsel/powerpc/"))
CFLAGS += -ffunction-sections
endif
CXXFLAGS := $(CFLAGS)
CONFIG_FLAGS := \
--enable-x11 --disable-directfb --enable-opengl --enable-png \
--enable-clansound --enable-lua --enable-network --enable-dyn \
--enable-vidmode --disable-smalljpeg --disable-debug \
--enable-asm386=$(use_asm386) \
--x-includes=/usr/include/X11 \
--prefix=/usr --mandir=/usr/share/man
build: configure-stamp build-stamp
build-stamp: configure-stamp
dh_testdir
$(MAKE)
touch $@
configure-stamp:
dh_testdir
QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" ./configure $(CONFIG_FLAGS)
touch $@
clean:
dh_testdir
dh_testroot
[ ! -f Makefile ] || $(MAKE) distclean
rm -f build-stamp configure-stamp
QUILT_PATCHES=debian/patches quilt pop -a -R || test $$? = 2
dh_clean
install: build-stamp
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
find debian/tmp -name '*.la' -exec rm '{}' ';'
dh_install --fail-missing --sourcedir=debian/tmp
binary-indep: build install
dh_testdir
dh_testroot
dh_installdebconf -i
dh_installdocs -pclanlib-doc
dh_installexamples -pclanlib-doc Examples/*
dh_installchangelogs -pclanlib-doc
dh_link -i
dh_compress -i
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
binary-arch: build install
dh_testdir
dh_testroot
dh_installdebconf -a
dh_installdocs -plibclanapp-0.8-1
dh_installchangelogs -plibclanapp-0.8-1
dh_strip -a
dh_link -a
dh_compress -a
dh_fixperms -a
dh_makeshlibs -plibclanapp-0.8-1 -V "libclanapp-0.8-1"
dh_makeshlibs -plibclansdl-0.8-1 -V "libclansdl-0.8-1"
dh_installdeb -a
dh_shlibdeps -a -L libclanapp-0.8-1 -L libclansdl-0.8-1 -ldebian/libclanapp-0.8-1/usr/lib:debian/libclansdl-0.8-1/usr/lib
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary: binary-indep binary-arch
.PHONY: binary binary-arch binary-indep build clean install
# vim: sw=8:ts=8:
|