1 #!/usr/bin/make -f 2 3 ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS))) 4 export DH_VERBOSE := 1 5 endif 6 7 include /usr/share/dpkg/default.mk 8 9 SOVERSION = $(word 3,$(subst ., ,$(DEB_VERSION_UPSTREAM))) 10 11 export DEB_BUILD_MAINT_OPTIONS :=hardening=+all optimize=-lto 12 13 arch_lto := amd64 armel armhf arm64 i386 powerpc ppc64 ppc64el s390x 14 with_lto := $(if $(findstring $(DEB_HOST_ARCH),$(arch_lto)),yes) 15 with_lto := $(if $(filter nolto,$(DEB_BUILD_OPTIONS)),no,$(with_lto)) 16 with_lto := $(if $(filter noopt,$(DEB_BUILD_OPTIONS)),no,$(with_lto)) 17 18 ifeq ($(with_lto),yes) 19 lto_flags := -g -flto=2 -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -gdescribe-dies -ginline-points 20 21 export DEB_CFLAGS_MAINT_APPEND += $(lto_flags) 22 export DEB_LDFLAGS_MAINT_APPEND += $(lto_flags) 23 endif 24 25 %: 26 dh $@ 27 28 override_dh_auto_configure: 29 dh_auto_configure -- \ 30 -D SOVERSION=$(SOVERSION) \ 31 -D BUILD_OPTIMIZE_SIZE=OFF \ 32 -D ZLIB_CHUNK_SIZE=131072 \ 33 -D NL80211_SUPPORT=OFF \ 34 -D RTNL_SUPPORT=OFF \ 35 -D UBUS_SUPPORT=OFF \ 36 -D UCI_SUPPORT=OFF \ 37 -D ULOOP_SUPPORT=OFF
This page was automatically generated by LXR 0.3.1. • OpenWrt