Cleaner make output

This commit is contained in:
Thomas Kolb 2013-01-20 19:41:27 +01:00
parent 3cb4e23860
commit cb8c926296
1 changed files with 14 additions and 4 deletions

View File

@ -14,16 +14,26 @@ OBJ=$(patsubst %.c, %.o, $(SOURCE))
all: debug
debug: CFLAGS+=-O0 -ggdb -DDEBUG
debug: $(TARGET)
debug: show_cflags $(TARGET)
@echo '>>>' DEBUG build complete.
release: CFLAGS+=-O3
release: $(TARGET)
release: show_cflags $(TARGET)
@echo '>>>' RELEASE build complete.
.PHONY show_cflags:
@echo --- Build parameters: ------------------------------------------
@echo CFLAGS\=$(CFLAGS)
@echo LIBS\=$(LIBS)
@echo -----------------------------------------------------------------
$(TARGET): $(OBJ) $(DEPS) Makefile
$(CC) -o $(TARGET) $(OBJ) $(LIBS)
@echo Linking...
@$(CC) -o $(TARGET) $(OBJ) $(LIBS)
%.o: %.c $(DEPS) Makefile
$(CC) -c $(CFLAGS) -o $@ $< $(INCLUDES)
@echo Compiling $< ...
@$(CC) -c $(CFLAGS) -o $@ $< $(INCLUDES)
doc:
doxygen doxygen.conf