3 CFLAGS := -g -Wall -I $(INCLUDE)
6 COMMONSRC := word.c cmem.c cerr.c
7 CASL2SRC := struct.c cmd.c hash.c
8 ASSRC := assemble.c token.c label.c
9 EXECSRC := exec.c dump.c
13 all: ../casl2 ../comet2 ../dumpword
15 ../casl2: casl2.o $(subst .c,.o,$(COMMONSRC) $(CASL2SRC) $(ASSRC) $(EXECSRC))
16 $(CC) $(CFLAGS) -o $@ $^
18 ../comet2: comet2.o $(subst .c,.o,$(COMMONSRC) $(CASL2SRC) $(EXECSRC))
19 $(CC) $(CFLAGS) -o $@ $^
21 ../dumpword: dumpword.o $(subst .c,.o,$(COMMONSRC))
22 $(CC) $(CFLAGS) -o $@ $^
28 @$(CC) -MM -I $(INCLUDE) $< | sed 's/\($*\.o\):/\1 $@:/g' >$@
30 -include $(subst .c,.d,casl2.c comet2.c dumpword.c $(COMMONSRC) $(CASL2SRC) $(ASSRC) $(EXECSRC))
32 TAGS: $(INCLUDE)/*.h *.c
33 @if test `which etags`; then etags $^; fi
36 @rm -f ../casl2 ../comet2 ../dumpword *.o *.d