arm64: init from arm
[uebersetzerbau-ss10.git] / gesamt_arm64 / Makefile
diff --git a/gesamt_arm64/Makefile b/gesamt_arm64/Makefile
new file mode 100644 (file)
index 0000000..db261f8
--- /dev/null
@@ -0,0 +1,49 @@
+SHELL := bash
+CC := /usr/lib/ccache/gcc
+NAME := gesamt_arm
+CFLAGS := -ansi -pedantic -D_GNU_SOURCE -g
+OBJS := scanner.o parser.o symtable.o code.o chelper.o tree.o
+
+all: $(NAME)
+
+$(NAME): $(OBJS)
+       @echo "  LINK    $@"
+       @$(CC) -o $@ $(OBJS) -lfl
+
+scanner.c: oxout.l
+       @echo "  FLEX    $<"
+       @flex -o$@ $<
+
+#dirty deps ;)
+%.o: %.c parser.h symtable.h chelper.h tree.h
+       @echo "  CC      $<"
+       @cp $< tmp.c
+       @$(CC) -c $(CFLAGS) $< #-Wall
+       @rm tmp.c
+
+parser.c: oxout.y chelper.h tree.h
+       @echo "  YACC    $<"
+       @yacc -t -v -d $< -o $@
+
+parser.h: parser.c
+
+oxout.y oxout.l: parser.y scanner.lex
+       @echo "  OX      $^"
+       @ox $^
+
+%.c: %.bfe chelper.h tree.h
+       @echo "  IBURG   $<"
+       @bfe < $< | iburg > $@
+
+.PHONY: clean
+clean:
+       rm -f $(NAME) $(OBJS) scanner.c parser.{h,c,output} oxout.{y,l,h} code.c
+
+1test:
+       ~/test/scripts/modlvatest_$(NAME).sh 2>&1
+
+lvatest:
+       /usr/ftp/pub/ublu/test/$(NAME)/test 2>&1
+
+bench:
+       ~/test/scripts/bench.sh $(NAME)