|
|
@@ -14,17 +14,20 @@ DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE 2> /dev/nul
|
|
|
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE 2> /dev/null || true)
|
|
|
arch := $(shell dpkg-architecture -qDEB_HOST_ARCH)
|
|
|
|
|
|
-ifneq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
|
|
|
+ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
|
|
|
config_arg := --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
|
|
|
else
|
|
|
config_arg :=
|
|
|
endif
|
|
|
|
|
|
+BUILD-DIRS := $(BUILD) $(BUILD)-static
|
|
|
+
|
|
|
+$(BUILD)-static/config.status: LDFLAGS = -static
|
|
|
# Setup the buildlocation
|
|
|
-$(BUILD)/config.status:
|
|
|
+$(BUILD)/config.status $(BUILD)-static/config.status:
|
|
|
$(checkdir)
|
|
|
- install -d $(BUILD)
|
|
|
- cd $(BUILD) && $(DIR)/configure \
|
|
|
+ install -d $(@D)
|
|
|
+ cd $(@D) && LDFLAGS=$(LDFLAGS) CFLAGS=$(CFLAGS) $(DIR)/configure \
|
|
|
--prefix=/usr \
|
|
|
--datadir=/usr/share \
|
|
|
--mandir=/usr/share/man \
|
|
|
@@ -40,15 +43,15 @@ clean:
|
|
|
$(checkdir)
|
|
|
rm -f debian/files debian/substvars
|
|
|
rm -f debian/dpkg.substvars
|
|
|
- rm -fr $(BUILD) $(TMP) $(TMP_DPKG) $(TMP_DPKG_DEV) $(TMP_DPKG_DOC)
|
|
|
+ rm -fr $(BUILD-DIRS) $(TMP) $(TMP_DPKG) $(TMP_DPKG_DEV) $(TMP_DPKG_DOC)
|
|
|
rm -f po/{cat-id-tbl.c,stamp-cat-id,*.gmo}
|
|
|
- rm -f stamp-build stamp-binary
|
|
|
+ rm -f stamp-build stamp-build-static stamp-binary
|
|
|
|
|
|
-build: stamp-build
|
|
|
+build build-static: build%: stamp-build%
|
|
|
|
|
|
-stamp-build: $(BUILD)/config.status
|
|
|
- $(MAKE) $(MFLAGS) -C $(BUILD)
|
|
|
- touch stamp-build
|
|
|
+stamp-build stamp-build-static: stamp-build%: $(BUILD)%/config.status
|
|
|
+ $(MAKE) $(MFLAGS) -C $(BUILD)$*
|
|
|
+ touch $@
|
|
|
|
|
|
binary: binary-arch binary-indep
|
|
|
|