aboutsummaryrefslogtreecommitdiff
path: root/scripts/write_config/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/write_config/Makefile')
-rw-r--r--scripts/write_config/Makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/write_config/Makefile b/scripts/write_config/Makefile
new file mode 100644
index 0000000..9bb6246
--- /dev/null
+++ b/scripts/write_config/Makefile
@@ -0,0 +1,23 @@
+MAKEFLAGS += --no-builtin-rules
+.PHONY: all clean
+.SUFFIXES:
+
+all: write
+
+KCONFIG_PREFIX = ../shared/kconfig
+include $(KCONFIG_PREFIX)/files.mk
+
+SRC = write.c
+OBJ = $(patsubst %.c,%.o,$(SRC))
+CFLAGS = -O0 -w -ggdb
+INCLUDES = -I../shared
+
+%.o: %.c
+ gcc -c $(CFLAGS) -o $@ $^ $(INCLUDES)
+
+write: $(OBJ) $(KCONFIG_OBJ)
+ gcc -o $@ $^
+
+clean::
+ $(RM) $(OBJ)
+ $(RM) write