Commit f5dfece4 authored by AnaLogiC76's avatar AnaLogiC76
Browse files

Add compact output to use with 'make -s'

Explicitely output CFLAGS once per session, then name of tool and file that
is being processed - this makes it feasable to use 'make -s' to only get
minimal progress feedback in addition to any warnings or error output by
the called tools.
parent 47f9c7c3
......@@ -371,8 +371,15 @@ LDFLAGS += -lm $(fpic)
#CFLAGS += -std=c99
CXXFLAGS += -std=c++98
# Cannot use macro here because of different syntax
ifeq ("ws","w$(findstring s,$(word 1,$(MAKEFLAGS)))")
$(info CFLAGS: $(CFLAGS))
$(info -------)
endif
define MAKE_SILENT
"ws" == "w$(findstring s,$(word 1,${MAKEFLAGS}))"
endef
ifeq ($(platform), theos_ios)
COMMON_FLAGS := -DIOS -DARM $(COMMON_DEFINES) $(INCFLAGS) -I$(THEOS_INCLUDE_PATH) -Wno-error
......@@ -384,20 +391,38 @@ else
all: $(TARGET)
$(TARGET): $(OBJECTS)
ifeq ($(platform), emscripten)
@if [[ $(MAKE_SILENT) ]]; then \
echo $(CXX): $@ \
fi
$(CXX) -r $(SHARED) -o $@ $(OBJECTS) $(LDFLAGS)
else ifeq ($(STATIC_LINKING), 1)
@if [[ $(MAKE_SILENT) ]]; then \
echo $(AR): $@; \
fi
$(AR) rcs $@ $(OBJECTS)
else
@if [[ $(MAKE_SILENT) ]]; then \
echo $(CXX): $@; \
fi
$(CXX) -o $@ $(OBJECTS) $(LDFLAGS)
endif
%.o: %.c
@if [[ $(MAKE_SILENT) ]]; then \
echo $(CC): $^; \
fi
$(CC) $(CFLAGS) -c $^ -o $@
%.o: %.cpp
@if [[ $(MAKE_SILENT) ]]; then \
echo $(CXX): $^; \
fi
$(CXX) $(CXXFLAGS) -c $^ -o $@
%.o: %.cc
@if [[ $(MAKE_SILENT) ]]; then \
echo $(CXX): $^; \
fi
$(CXX) $(CXXFLAGS) -c $^ -o $@
clean:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment