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.
# You may simply check the flags later with:
# $ readelf -p .GCC.command.line rmpsd
ifeq "$(DEBUG)" "yes"
ifeq ($(DEBUG), yes)
CCFLAGS += -frecord-gcc-switches -g
endif
@@ -39,9 +39,14 @@ $(EXECUTABLE): $(OBJECTS)
@echo ' LD $@'
@$(CC) $(LDFLAGS) $(SQLLDFLAGS) $(OBJECTS) -o $@
#ifeq "$(VERBOSE)" "yes"
.c.o:
ifeq ($(VERBOSE), yes)
$(CC) $(CCFLAGS) $(WFLAGS) $(SQLCCFLAGS) $(OLEVEL) -c $< -o $@
else
@echo ' CC $@'
@$(CC) $(CCFLAGS) $(WFLAGS) $(SQLCCFLAGS) $(OLEVEL) -c $< -o $@
endif
clean:
rm -f $(OBJECTS) $(EXECUTABLE)