SHELL := bash
NAME := codea
-CFLAGS := -ansi -pedantic -D_GNU_SOURCE
-OBJS := scanner.o parser.o symtable.o code.o chelper.o
+CFLAGS := -ansi -pedantic -D_GNU_SOURCE -g
+OBJS := scanner.o parser.o symtable.o code.o chelper.o tree.o
all: $(NAME)
@flex -o$@ $<
#dirty deps ;)
-%.o: %.c parser.h symtable.h chelper.h
+%.o: %.c parser.h symtable.h chelper.h tree.h
@echo " CC $<"
+ @cp $< tmp.c
@gcc -c $(CFLAGS) $< #-Wall
+ @rm tmp.c
-parser.c: oxout.y chelper.h
+parser.c: oxout.y chelper.h tree.h
@echo " YACC $<"
@yacc -t -v -d $< -o $@
@echo " OX $^"
@ox $^
-%.c: %.bfe chelper.h
+%.c: %.bfe chelper.h tree.h
@echo " IBURG $<"
@bfe < $< | iburg > $@
rm -f $(NAME) $(OBJS) scanner.c parser.{h,c,output} oxout.{y,l,h} code.c
1test:
- @echo " CC callingconvention.c"
- @gcc -c -fomit-frame-pointer -fno-defer-pop testit/callingconvention.c -o testit/callingconvention.o
- @./testit/test
+ ~/test/scripts/modlvatest_codea.sh 2>&1
-2test:
+lvatest:
/usr/ftp/pub/ublu/test/$(NAME)/test 2>&1
+
+bench:
+ ~/test/scripts/bench.sh $(NAME)