File: rules

package info (click to toggle)
xabacus 7.1.3-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,084 kB
  • ctags: 914
  • sloc: ansic: 10,242; sh: 2,725; makefile: 540
file content (83 lines) | stat: -rwxr-xr-x 2,151 bytes parent folder | download
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
#!/usr/bin/make -f
# -*- makefile -*-
#  # Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

#export DH_VERBOSE=1

DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

CONFIGURE_FLAGS := --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
		    --prefix=/usr --bindir=/usr/games --mandir=/usr/share/man \
		    --with-xpm --without-rplay --with-esound --without-nas

CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
else
        CFLAGS += -O2
endif

build:
	true

build-motif-stamp:
	dh_testdir
	CFLAGS="$(CFLAGS)" ./configure $(CONFIGURE_FLAGS) --with-motif
	$(MAKE)
	touch $@

build-nomotif-stamp:
	dh_testdir
	-$(MAKE) distclean
	CFLAGS="$(CFLAGS)" ./configure $(CONFIGURE_FLAGS) --without-motif
	$(MAKE)
	touch $@

clean:
	dh_testdir
	dh_testroot
	-$(MAKE) distclean
	rm -rf	build-motif-stamp build-nomotif-stamp
	dh_clean

install: install-motif-stamp install-nomotif-stamp
	for INFIX in '' m ; do \
		set -e ; \
		PIXDIR=$(CURDIR)/debian/x$${INFIX}abacus/usr/share/pixmaps ; \
		install -D -m 0644 $(CURDIR)/icons/abacus.t.xpm $$PIXDIR/x$${INFIX}abacus.t.xpm ; \
		install -D -m 0644 $(CURDIR)/icons/abacus.m.xpm $$PIXDIR/x$${INFIX}abacus.m.xpm ; \
		rm $(CURDIR)/debian/x$${INFIX}abacus/usr/share/games/xabacus/Abacus.ps ; \
	done

install-motif-stamp: build-motif-stamp
	dh_testroot
	$(MAKE) install DESTDIR=$(CURDIR)/debian/xmabacus xapploaddir=/etc/X11/app-defaults

install-nomotif-stamp: build-nomotif-stamp
	dh_testroot
	$(MAKE) install DESTDIR=$(CURDIR)/debian/xabacus xapploaddir=/etc/X11/app-defaults

binary-indep: install
# We have nothing to do by default.

binary-arch: install
	dh_testdir -a
	dh_testroot -a
	dh_installdocs -a -A debian/README.Debian Abacus.ps README
	dh_installmenu -a
	dh_installman -a
	dh_installchangelogs -a
	dh_strip -a
	dh_link -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary