3 CFLAGS = -g -Wall -I $(INCLUDE)
5 COMMONSRC = word.c cmem.c cerr.c
6 CASL2SRC = struct.c cmd.c hash.c
7 ASSRC = assemble.c token.c label.c
8 EXECSRC = exec.c dump.c
12 all: ../casl2 ../comet2 ../dumpword
14 ../casl2: casl2.o $(subst .c,.o,$(COMMONSRC) $(CASL2SRC) $(ASSRC) $(EXECSRC))
15 $(CC) $(CFLAGS) -o $@ $^
17 ../comet2: comet2.o $(subst .c,.o,$(COMMONSRC) $(CASL2SRC) $(EXECSRC))
18 $(CC) $(CFLAGS) -o $@ $^
20 ../dumpword: dumpword.o $(subst .c,.o,$(COMMONSRC))
21 $(CC) $(CFLAGS) -o $@ $^
27 @$(CC) -MM -I $(INCLUDE) $< | sed 's/\($*\.o\):/\1 $@:/g' >$@
29 -include $(subst .c,.d,casl2.c comet2.c dumpword.c $(COMMONSRC) $(CASL2SRC) $(ASSRC) $(EXECSRC))
31 TAGS: $(INCLUDE)/*.h *.c
32 @if test `which etags`; then etags $^; fi
35 @rm -f ../casl2 ../comet2 ../dumpword *.o *.d