Cleaner make output

This commit is contained in:
Thomas Kolb 2013-01-20 19:41:27 +01:00
parent 3cb4e23860
commit cb8c926296

View file

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