File: rules

package info (click to toggle)
antpm 1.24-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,140 kB
  • sloc: cpp: 9,188; ansic: 2,728; sh: 186; python: 181; makefile: 70; xml: 31
file content (47 lines) | stat: -rwxr-xr-x 1,367 bytes parent folder | download | duplicates (5)
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
#!/usr/bin/make -f
# -*- makefile -*-

# ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
#   CFLAGS += -O2
# endif

export DH_VERBOSE=1

NUMCPUS=$(shell grep -c '^processor' /proc/cpuinfo)

CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)

%:
	dh $@

override_dh_auto_configure:
	# echo -e "\n\n\nCMAKE\n\n\n"
	# echo $(NUMCPUS)
	mkdir cmake-build
	cd cmake-build && cmake ../src -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} $(CFLAGS)" -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} $(CXXFLAGS)"

override_dh_auto_build:
	cd cmake-build && $(MAKE) -j$(NUMCPUS)

override_dh_strip:
	#dh_strip -pantpm-downloader --dbg-package=antpm-dbg
	#dh_strip -pantpm-fit2gpx --dbg-package=antpm-dbg
	#dh_strip -pantpm-usbmon2ant --dbg-package=antpm-dbg
	#dh_strip -pgant --dbg-package=antpm-dbg
	dh_strip --dbg-package=antpm-dbg
	dh_strip -s --remaining-packages

DESTDIR=../debian/antpm/
override_dh_install:
	cd cmake-build && $(MAKE) install DESTDIR=$(DESTDIR)
	dh_installudev 

build:
	cp scripts/80-ant-stick.rules debian/antpm.udev
	cp src/antpm-downloader.1 debian/
	cp src/antpm-fit2gpx.1 debian/
	cp src/antpm-usbmon2ant.1 debian/
	cp src/gant/gant.1 debian/