summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..b5a42c3
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+PROJECT=kconf2h
+CC=gcc
+CFLAGS=
+SOURCES=$(PROJECT)_parser.c
+OBJECTS=$(SOURCES:.c=.o)
+
+all: clean ragel $(OBJECTS) $(PROJECT)
+
+$(PROJECT):
+ $(CC) $(CFLAGS) $(OBJECTS) $(PROJECT).c -o $(PROJECT)
+
+ragel:
+ ragel $(PROJECT)_parser.ragel
+
+%.o: %.c
+ $(CC) $(CFLAGS) -c $<
+
+clean:
+ rm -f $(PROJECT)
+ rm -f *.o