X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=idl%2FMakefile;h=6534ffe3677185790d468845b3e90d7648f39fcf;hp=e17b52685084c7764bc6085168bde79df200986a;hb=9e0411db099e71409f0ee8a8f464aa34ac65c778;hpb=69008ba2a7733358974c8985caa2e5bcb1182fe1 diff --git a/idl/Makefile b/idl/Makefile index e17b526..6534ffe 100644 --- a/idl/Makefile +++ b/idl/Makefile @@ -1,12 +1,14 @@ CFLAGS += -g -D$(shell uname | tr a-z A-Z) -SOURCES := parser_proc.c parser.c lexer.c validator.c compiler.c main.c -MAKEHEADERS := $(addsuffix .[ch], $(basename $(SOURCES))) +SOURCES := parser_proc.c parser.c validator.c compiler.c main.c GENERATED_FILES := $(addsuffix .h, $(basename $(SOURCES))) .PHONY: all -all: headers main +all: main +## +# The lemon parser generator +## GENERATED_FILES += lempar.c lempar.c: curl -sSo $@ "http://www.sqlite.org/src/raw/tool/lempar.c?name=3617143ddb9b176c3605defe6a9c798793280120" @@ -18,15 +20,24 @@ lemon.c: GENERATED_FILES += lemon lemon: lemon.c | lempar.c +## +# Main test program +## GENERATED_FILES += main main: $(SOURCES) +## +# Parser proc +## GENERATED_FILES += parser_proc.c parser_proc.c: parser_proc.y lemon - ./lemon -c $@ + ./lemon -c $< -GENERATED_FILES += lexer.c -lexer.c: lexer.re +## +# Parser with lexer +## +GENERATED_FILES += parser.c +parser.c: parser.re re2c -o $@ $< .PHONY: clean