デバッグのため、ビルド後に*.oファイルを削除しないよう変更
[YACASL2.git] / src / Makefile
index 93a2449..a394531 100644 (file)
@@ -1,10 +1,10 @@
 INCLUDE := ../include
 CC := gcc
-CFLAGS := -g -Wall -I $(INCLUDE)
+CFLAGS := -g -Wall -Wextra -I $(INCLUDE)
 RM := rm -f
 
 COMMONSRC := word.c cmem.c cerr.c
-CASL2SRC := struct.c cmd.c hash.c
+CASL2SRC := struct.c hash.c
 ASSRC := assemble.c token.c label.c
 EXECSRC := exec.c dump.c
 
@@ -14,12 +14,15 @@ all: ../casl2 ../comet2 ../dumpword
 
 ../casl2: casl2.o $(subst .c,.o,$(COMMONSRC) $(CASL2SRC) $(ASSRC) $(EXECSRC))
        $(CC) $(CFLAGS) -o $@ $^
+       @rm -f *.d
 
 ../comet2: comet2.o $(subst .c,.o,$(COMMONSRC) $(CASL2SRC) $(EXECSRC))
        $(CC) $(CFLAGS) -o $@ $^
+       @rm -f *.d
 
 ../dumpword: dumpword.o $(subst .c,.o,$(COMMONSRC))
        $(CC) $(CFLAGS) -o $@ $^
+       @rm -f *.d
 
 %.o: %.c
        $(CC) -c $(CFLAGS) $<
@@ -33,4 +36,5 @@ TAGS: $(INCLUDE)/*.h *.c
        @if test `which etags`; then etags $^; fi
 
 clean:
-       @rm -f ../casl2 ../comet2 ../dumpword *.o *.d
+       @rm -f ../casl2 ../comet2 ../dumpword
+       @rm -f *.o *.d