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
|
#!/usr/bin/make -f
# Enable verbose build by default, disable when terse is specified.
ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
VERBOSE=1
else
VERBOSE=0
endif
unexport ELF_PACKAGE_METADATA
%:
dh $@
override_dh_auto_build:
# Always set CROSS_COMPILE, which also works for native builds.
# Strip binaries, since dh_strip may not be called for arch:all.
CROSS_COMPILE=riscv64-linux-gnu- make \
V=$(VERBOSE) \
FW_PAYLOAD=n \
O=debian/build64 \
PLATFORM=generic ; \
CROSS_COMPILE=riscv64-linux-gnu- make \
V=$(VERBOSE) \
FW_PAYLOAD=n \
O=debian/build32 \
PLATFORM_RISCV_XLEN=32 \
PLATFORM=generic ; \
for elffile in debian/build*/platform/generic/firmware/fw_*.elf ; do \
riscv64-linux-gnu-strip --remove-section=.comment \
--remove-section=.note \
$${elffile} ; \
done
override_dh_installdocs:
dh_installdocs --exclude=doxygen.cfg
override_dh_auto_install:
dh_auto_install --sourcedir=debian/build64
dh_auto_install --sourcedir=debian/build32
override_dh_auto_clean:
dh_auto_clean
rm -rf debian/build32 debian/build64
|