megactl/debian/rules

70 lines
1.3 KiB
Plaintext
Raw Normal View History

2017-04-22 15:01:27 +02:00
#!/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
2017-04-22 16:51:10 +02:00
$(MAKE) CFLAGS="$(CFLAGS) \$$(INC) \$$(ARCH)" -C src/ megatrace
mv src/megatrace src/megatrace.i386
$(MAKE) clean -C src/
2017-04-22 15:01:27 +02:00
$(MAKE) $(MY_MAKEOPTS) CFLAGS="$(CFLAGS) \$$(INC) \$$(ARCH)" -C src/
2017-04-22 16:51:10 +02:00
mv src/megatrace.i386 src/megatrace
2017-04-22 15:01:27 +02:00
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