diff --git a/Makefile b/Makefile index dd8543d..62470dc 100644 --- a/Makefile +++ b/Makefile @@ -25,5 +25,13 @@ .c.o: $(CC) -c $(CFLAGS) $(DEFS) $(INCDIR) -o $@ $< $(LDFLAGS) +# プリプロセスのみ実行して .i ファイルを出力 +pre: + @for f in $(CSRCS); do \ + base=$$(basename $$f .c); \ + $(CC) -E $(CFLAGS) $(DEFS) $(INCDIR) $$f -o $$base.i; \ + echo "Preprocessed $$f -> $$base.i"; \ + done + clean: - $(RM) $(OBJS) $(TARGET) core *.o *~ + $(RM) $(OBJS) $(TARGET) core *.o *~ *.i