Support verbosity in Makefile

This commit is contained in:
Bogomil Vasilev
2017-08-22 14:29:08 +03:00
parent e0f21d9c08
commit 27b513cda4

View File

@@ -11,7 +11,7 @@ CCFLAGS += -pipe \
# Use this to store compile flags and debug info. # Use this to store compile flags and debug info.
# You may simply check the flags later with: # You may simply check the flags later with:
# $ readelf -p .GCC.command.line rmpsd # $ readelf -p .GCC.command.line rmpsd
ifeq "$(DEBUG)" "yes" ifeq ($(DEBUG), yes)
CCFLAGS += -frecord-gcc-switches -g CCFLAGS += -frecord-gcc-switches -g
endif endif
@@ -39,9 +39,14 @@ $(EXECUTABLE): $(OBJECTS)
@echo ' LD $@' @echo ' LD $@'
@$(CC) $(LDFLAGS) $(SQLLDFLAGS) $(OBJECTS) -o $@ @$(CC) $(LDFLAGS) $(SQLLDFLAGS) $(OBJECTS) -o $@
#ifeq "$(VERBOSE)" "yes"
.c.o: .c.o:
ifeq ($(VERBOSE), yes)
$(CC) $(CCFLAGS) $(WFLAGS) $(SQLCCFLAGS) $(OLEVEL) -c $< -o $@
else
@echo ' CC $@' @echo ' CC $@'
@$(CC) $(CCFLAGS) $(WFLAGS) $(SQLCCFLAGS) $(OLEVEL) -c $< -o $@ @$(CC) $(CCFLAGS) $(WFLAGS) $(SQLCCFLAGS) $(OLEVEL) -c $< -o $@
endif
clean: clean:
rm -f $(OBJECTS) $(EXECUTABLE) rm -f $(OBJECTS) $(EXECUTABLE)