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 48 49 50
|
#!/usr/bin/make -f
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
conf_add := --enable-debug
else
conf_add :=
endif
BUILD := DEB-BUILD
BUILD_DATETIME := $(shell dpkg-parsechangelog -S Date)
DH_AUTO_OPTIONS := -v -Sautoconf -B$(BUILD) --parallel
export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie # pie does not work with shared libs
export CFLAGS := -g -D_REENTRANT \
$(shell dpkg-buildflags --get CFLAGS)
export LDFLAGS := -Wl,-z,noexecstack -Wl,-z,defs -Wl,--as-needed \
$(shell dpkg-buildflags --get LDFLAGS)
export UCL_EXTRA_CPPFLAGS := '-DBUILD_DATETIME="$(BUILD_DATETIME)"'
%:
dh "$@" --with=autoreconf
override_dh_auto_configure: $(BUILD)/configure-stamp
$(BUILD)/configure-stamp:
@echo "==> Configuring UCL"
dh_auto_configure $(DH_AUTO_OPTIONS) -- \
--enable-shared $(conf_add)
touch "$@"
override_dh_auto_build: $(BUILD)/build-stamp
$(BUILD)/build-stamp: $(BUILD)/configure-stamp
@echo "==> Building UCL"
dh_auto_build $(DH_AUTO_OPTIONS)
touch "$@"
override_dh_auto_clean:
rm -f $(BUILD)/build-stamp $(BUILD)/configure-stamp
dh_auto_clean $(DH_AUTO_OPTIONS)
override_dh_auto_install:
dh_auto_install $(DH_AUTO_OPTIONS)
override_dh_installchangelogs:
dh_installchangelogs NEWS
override_dh_makeshlibs:
dh_makeshlibs -Nlibucl-dev -V
|