Start work on temperature profile checker
This commit is contained in:
43
temp-profile-checker/parser/Makefile
Normal file
43
temp-profile-checker/parser/Makefile
Normal file
@@ -0,0 +1,43 @@
|
||||
LEXER := flex
|
||||
YACC := bison
|
||||
CC := gcc
|
||||
|
||||
YACC_FLAGS := -yd
|
||||
LEXER_FLAGS :=
|
||||
|
||||
LANG_NAME := lang
|
||||
|
||||
|
||||
ifneq ($(VERBOSE),true)
|
||||
QUIET=@
|
||||
else
|
||||
QUIET=
|
||||
endif
|
||||
|
||||
default: test
|
||||
|
||||
y.tab.c: $(LANG_NAME).yacc
|
||||
$(QUIET)echo "[$(YACC)] $@"
|
||||
$(QUIET)$(YACC) $(YACC_FLAGS) $<
|
||||
|
||||
lex.yy.c: $(LANG_NAME).lex
|
||||
$(QUIET)echo "[$(LEXER)] $@"
|
||||
$(QUIET)$(LEXER) $^
|
||||
|
||||
test: y.tab.c lex.yy.c
|
||||
$(QUIET)echo "[CC] $@"
|
||||
$(QUIET)$(CC) -o $@ $^
|
||||
|
||||
|
||||
|
||||
.PHONY: clean run
|
||||
|
||||
run: test
|
||||
./test
|
||||
|
||||
clean:
|
||||
$(QUIET)echo "Clean up..."
|
||||
$(QUIET)rm -f *.c *.o y.tab.h test
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user