arm64: codea/abgabe_aa.0
[uebersetzerbau-ss10.git] / ag / Makefile
index d4eff747f76f2944b8e14a53731d2712a38dcd0e..1ca5f9a8cd143cb66db5eaa775abe2a2d55268b3 100644 (file)
@@ -2,12 +2,11 @@ SHELL := bash
 NAME := ag
 CFLAGS := -ansi -pedantic -D_GNU_SOURCE
 OBJS := scanner.o parser.o symtable.o
-TARGETS := parser.y scanner.lex
 
 all: $(NAME)
 
 $(NAME): $(OBJS)
-       @echo "  LINK    $<"
+       @echo "  LINK    $@"
        @gcc -o $@ $(OBJS) -lfl
 
 scanner.c: oxout.l
@@ -24,13 +23,13 @@ parser.c: oxout.y
 
 parser.h: parser.c
 
-oxout.y oxout.l: $(TARGETS)
-       @echo "  OX      $(TARGETS)"
-       @ox parser.y scanner.lex
+oxout.y oxout.l: parser.y scanner.lex
+       @echo "  OX      $^"
+       @ox $^
 
 .PHONY: clean
 clean:
-       rm -f $(NAME) $(OBJS) scanner.c parser.{h,c,output} oxout.{y,l}
+       rm -f $(NAME) $(OBJS) scanner.c parser.{h,c,output} oxout.{y,l,h} cscope.out tags
 
 1test: 2test