aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-04-12 11:07:15 +0200
committerKarel Kočí <cynerd@email.cz>2015-04-12 11:07:15 +0200
commit2e39c070b3f1da75e4a86a0b9407e038a4cc5108 (patch)
tree10acb29088caafeaeebae488c4bc06fed8d5fb8e
parenteec0f2f4a6b5c1f8f568f6ca2ed2e3760b59f029 (diff)
downloadlinux-conf-perf-2e39c070b3f1da75e4a86a0b9407e038a4cc5108.tar.gz
linux-conf-perf-2e39c070b3f1da75e4a86a0b9407e038a4cc5108.tar.bz2
linux-conf-perf-2e39c070b3f1da75e4a86a0b9407e038a4cc5108.zip
parse_kconfig make builds *.o files
Until now *.o files were not created.
-rw-r--r--scripts/parse_kconfig/Makefile11
-rw-r--r--scripts/shared/kconfig/files.mk6
2 files changed, 15 insertions, 2 deletions
diff --git a/scripts/parse_kconfig/Makefile b/scripts/parse_kconfig/Makefile
index 8547617..c102a73 100644
--- a/scripts/parse_kconfig/Makefile
+++ b/scripts/parse_kconfig/Makefile
@@ -1,3 +1,4 @@
+MAKEFLAGS += --no-builtin-rules
.PHONY: all clean
.SUFFIXES:
@@ -10,10 +11,16 @@ SRC = parser.c \
cnfexpr.c \
symlist.c \
output.c
+OBJ = $(patsubst %.c,%.o,$(SRC))
CFLAGS = -O0 -w -ggdb
+INCLUDES = -I../shared
-parse: $(SRC) $(KCONFIG_SRC)
- gcc $(CFLAGS) -o $@ $^ -I../shared
+%.o: %.c
+ gcc -c $(CFLAGS) -o $@ $^ $(INCLUDES)
+
+parse: $(OBJ) $(KCONFIG_OBJ)
+ gcc -o $@ $^
clean::
+ $(RM) $(OBJ)
$(RM) parser
diff --git a/scripts/shared/kconfig/files.mk b/scripts/shared/kconfig/files.mk
index 5552991..e51146a 100644
--- a/scripts/shared/kconfig/files.mk
+++ b/scripts/shared/kconfig/files.mk
@@ -7,6 +7,9 @@ ifndef KCONFIG_PREFIX
endif
KCONFIG_SRC = $(KCONFIG_PREFIX)/zconf.tab.c
+KCONFIG_OBJ = $(KCONFIG_PREFIX)/zconf.tab.o
+
+KCONFIG_CFLAGS = -O3
%.hash.c: %.gperf
gperf -t --output-file $@ -a -C -E -g -k '1,3,$$' -p -t $<
@@ -19,8 +22,11 @@ $(KCONFIG_PREFIX)/zconf.tab.c: $(KCONFIG_PREFIX)/zconf.hash.c
%.tab.c: %.y
bison -o $@ $< -p zconf -t -l
+$(KCONFIG_PREFIX)/zconf.tab.o: $(KCONFIG_PREFIX)/zconf.tab.c
+ gcc $(KCONFIG_CFLAGS) -c -o $@ $^
clean::
+ $(RM) $(KCONFIG_OBJ)
$(RM) $(KCONFIG_PREFIX)/zconf.tab.c
$(RM) $(KCONFIG_PREFIX)/zconf.lex.c
$(RM) $(KCONFIG_PREFIX)/zconf.hash.c