Cleaner make output
This commit is contained in:
parent
3cb4e23860
commit
cb8c926296
18
Makefile
18
Makefile
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue