summaryrefslogtreecommitdiff
path: root/kconfig
diff options
context:
space:
mode:
Diffstat (limited to 'kconfig')
-rw-r--r--kconfig/.gitignore1
-rw-r--r--kconfig/Makefile.in (renamed from kconfig/Makefile)13
2 files changed, 12 insertions, 2 deletions
diff --git a/kconfig/.gitignore b/kconfig/.gitignore
index 7f79a8d..473d174 100644
--- a/kconfig/.gitignore
+++ b/kconfig/.gitignore
@@ -6,3 +6,4 @@ zconf.lex.c
zconf.hash.c
zconf.tab.c
*.exe
+Makefile
diff --git a/kconfig/Makefile b/kconfig/Makefile.in
index 4a33ac8..403d04b 100644
--- a/kconfig/Makefile
+++ b/kconfig/Makefile.in
@@ -15,6 +15,12 @@ CFLAGS = -DCONFIG_=\"CT_\" -DPACKAGE="\"crosstool-NG $(VERSION)\"" \
-DGPERF_LEN_TYPE="$(gperf_len_type)"
LDFLAGS = $(INTL_LIBS)
+ifneq (@DPKG_BUILDFLAGS@,)
+CFLAGS += $(shell @DPKG_BUILDFLAGS@ --get CPPFLAGS) \
+ $(shell @DPKG_BUILDFLAGS@ --get CFLAGS)
+LDFLAGS += $(shell @DPKG_BUILDFLAGS@ --get LDFLAGS)
+endif
+
# Compiler flags to use gettext
ifeq ($(gettext),)
INTL_CFLAGS = -Wno-format-security -DKBUILD_NO_NLS
@@ -103,8 +109,11 @@ conf: $(COMMON_OBJ) $(conf_OBJ)
# Installation
install: $(patsubst %,install-%,$(PROGS)) install-kconfig.mk
-install-%: %
- $(call __silent,INSTALL,$<)install $< $(DESTDIR)/$<
+$(patsubst %,install-%,$(PROGS)): install-%: %
+ $(call __silent,INSTALL,$<)install -m 0755 $< $(DESTDIR)/$<
+
+install-kconfig.mk: kconfig.mk
+ $(call __silent,INSTALL,$<)install -m 0644 $< $(DESTDIR)/$<
#-----------------------------------------------------------
# Cleaning up the mess...