This reverts commit de3c42125b
.
This commit is contained in:
parent
1efc79063c
commit
4c625d8286
3 changed files with 6 additions and 12 deletions
|
@ -15,13 +15,6 @@ VPATH :=
|
|||
# Helper to return the distinct elements of a list
|
||||
uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))
|
||||
|
||||
cc-option = $(shell \
|
||||
if $(CC) $(1) -shared -o /dev/null -xc /dev/null > /dev/null 2>&1; \
|
||||
then echo "$(1)"; else echo "$(2)"; fi)
|
||||
|
||||
# helper to pass comma character to make functions
|
||||
, := ,
|
||||
|
||||
# Convert all SRC to OBJ
|
||||
define OBJ_FROM_SRC
|
||||
$(patsubst %.c,$1/%.o,$(patsubst %.cpp,$1/%.o,$(patsubst %.cc,$1/%.o,$(patsubst %.S,$1/%.o,$(patsubst %.clib,$1/%.a,$($1_SRC))))))
|
||||
|
@ -73,7 +66,9 @@ CFLAGS += $(CDEFS)
|
|||
CFLAGS += -O$(OPT)
|
||||
# add color
|
||||
ifeq ($(COLOR),true)
|
||||
CFLAGS+= $(call cc-option, -fdiagnostics-color)
|
||||
ifeq ("$(shell echo "int main(){}" | $(CC) -fdiagnostics-color -x c - -o /dev/null 2>&1)", "")
|
||||
CFLAGS+= -fdiagnostics-color
|
||||
endif
|
||||
endif
|
||||
CFLAGS += -Wall
|
||||
CFLAGS += -Wstrict-prototypes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue