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
|
#!/usr/bin/make -f
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118164
include /usr/share/dpkg/architecture.mk
ifneq (,$(filter $(DEB_HOST_ARCH),armel armhf))
DEB_ADAFLAGS_MAINT_APPEND := -fno-stack-check
endif
DEB_BUILD_MAINT_OPTIONS := hardening=+all
DEB_LDFLAGS_MAINT_APPEND := \
-Wl,--no-undefined \
-Wl,--no-copy-dt-needed-entries \
-Wl,--no-allow-shlib-undefined
DPKG_EXPORT_BUILDFLAGS := 1
include /usr/share/dpkg/buildflags.mk
include /usr/share/ada/packaging.mk
%:
dh $@
project := -Pada_bar_codes.gpr
static := $(project) -XABC_Build_Mode=static
shared := $(project) -XABC_Build_Mode=relocatable \
-XABC_Library_Version=libada_bar_codes.so.$(ada_bar_codes_SO_VERSION)
override_dh_auto_build:
gprbuild $(GPRBUILDFLAGS) $(static)
gprbuild $(GPRBUILDFLAGS) $(shared)
override_dh_auto_test:
# Build the library a third time, with distinct options, demo and test.
gprbuild $(GPRBUILDFLAGS) $(project) -XABC_Build_Mode=Debug
# Write the output in the build directory.
cd obj && ../bar_codes_demo
cd obj && ../bar_codes_test
override_dh_auto_install:
gprinstall $(static) $(static_GPRINSTALLFLAGS)
gprinstall $(shared) $(call shared_GPRINSTALLFLAGS,ada_bar_codes)
|