summaryrefslogtreecommitdiff
path: root/debian/rules
blob: 1f6615990fc53a3d84da36f5463625ddfe31f421 (plain)
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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#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)

HOST_CFLAGS := -g -Wall

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  HOST_CFLAGS += -O0
else
  HOST_CFLAGS += -O2
endif

HOST_CFLAGS += -Wno-error=unused-result

unexport CFLAGS
export HOST_CFLAGS

CROSS_COMPILE := $(DEB_HOST_GNU_TYPE)-
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
  CROSS_COMPILE :=
endif

%:
	dh $@ --parallel

override_dh_auto_configure:
	./autogen.sh
	dh_auto_configure -- --with-platform=uboot

override_dh_auto_test: