66 lines
1.1 KiB
Plaintext
66 lines
1.1 KiB
Plaintext
|
#!/usr/bin/make -f
|
||
|
|
||
|
# Uncomment this to turn on verbose mode.
|
||
|
#export DH_VERBOSE=1
|
||
|
|
||
|
include /usr/share/dpatch/dpatch.make
|
||
|
|
||
|
ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH)
|
||
|
|
||
|
CFLAGS = -Wall -g
|
||
|
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
||
|
CFLAGS += -O0
|
||
|
else
|
||
|
CFLAGS += -O2
|
||
|
endif
|
||
|
|
||
|
ifeq ($(ARCH),i386)
|
||
|
MY_MAKEOPTS="ARCH=-m32"
|
||
|
else
|
||
|
MY_MAKEOPTS="ARCH=-m64"
|
||
|
endif
|
||
|
# $(MAKE) CFLAGS="$(CFLAGS) \$$(INC) \$$(ARCH)" -C src/
|
||
|
|
||
|
build: build-stamp
|
||
|
build-stamp: patch-stamp
|
||
|
dh_testdir
|
||
|
$(MAKE) $(MY_MAKEOPTS) CFLAGS="$(CFLAGS) \$$(INC) \$$(ARCH)" -C src/
|
||
|
touch $@
|
||
|
|
||
|
clean: unpatch
|
||
|
dh_testdir
|
||
|
dh_testroot
|
||
|
rm -f build-stamp
|
||
|
$(MAKE) clean -C src/
|
||
|
dh_clean
|
||
|
|
||
|
install: build
|
||
|
dh_testdir
|
||
|
dh_testroot
|
||
|
dh_clean -k
|
||
|
dh_installdirs
|
||
|
|
||
|
binary-indep: build install
|
||
|
binary-arch: build install
|
||
|
dh_testdir
|
||
|
dh_testroot
|
||
|
dh_installchangelogs
|
||
|
dh_installdocs
|
||
|
dh_installexamples
|
||
|
dh_install
|
||
|
dh_installman
|
||
|
dh_link
|
||
|
dh_strip
|
||
|
dh_compress
|
||
|
dh_fixperms
|
||
|
dh_installdeb
|
||
|
ifeq ($(ARCH),i386)
|
||
|
dh_shlibdeps
|
||
|
endif
|
||
|
dh_gencontrol
|
||
|
dh_md5sums
|
||
|
dh_builddeb
|
||
|
|
||
|
binary: binary-indep binary-arch
|
||
|
.PHONY: build clean binary-indep binary-arch binary install
|