aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/rules.mk
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/rules.mk')
-rw-r--r--tmk_core/rules.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk
index 597f7aa82..5a7f29910 100644
--- a/tmk_core/rules.mk
+++ b/tmk_core/rules.mk
@@ -105,7 +105,10 @@ endif
105#CFLAGS += -Wundef 105#CFLAGS += -Wundef
106#CFLAGS += -Wunreachable-code 106#CFLAGS += -Wunreachable-code
107#CFLAGS += -Wsign-compare 107#CFLAGS += -Wsign-compare
108GCC_VERSION := $(shell gcc --version 2>/dev/null)
109ifeq ($(findstring clang, ${GCC_VERSION}),)
108CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) 110CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
111endif
109CFLAGS += $(CSTANDARD) 112CFLAGS += $(CSTANDARD)
110 113
111# This fixes lots of keyboards linking errors but SHOULDN'T BE A FINAL SOLUTION 114# This fixes lots of keyboards linking errors but SHOULDN'T BE A FINAL SOLUTION
@@ -137,7 +140,9 @@ endif
137#CXXFLAGS += -Wstrict-prototypes 140#CXXFLAGS += -Wstrict-prototypes
138#CXXFLAGS += -Wunreachable-code 141#CXXFLAGS += -Wunreachable-code
139#CXXFLAGS += -Wsign-compare 142#CXXFLAGS += -Wsign-compare
143ifeq ($(findstring clang, ${GCC_VERSION}),)
140CXXFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) 144CXXFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
145endif
141#CXXFLAGS += $(CSTANDARD) 146#CXXFLAGS += $(CSTANDARD)
142 147
143#---------------- Assembler Options ---------------- 148#---------------- Assembler Options ----------------
@@ -150,11 +155,13 @@ CXXFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
150# -listing-cont-lines: Sets the maximum number of continuation lines of hex 155# -listing-cont-lines: Sets the maximum number of continuation lines of hex
151# dump that will be displayed for a given single line of source input. 156# dump that will be displayed for a given single line of source input.
152ASFLAGS += $(ADEFS) 157ASFLAGS += $(ADEFS)
158ifeq ($(findstring clang, ${GCC_VERSION}),)
153ifeq ($(strip $(DEBUG_ENABLE)),yes) 159ifeq ($(strip $(DEBUG_ENABLE)),yes)
154 ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100 160 ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100
155else 161else
156 ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),--listing-cont-lines=100 162 ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),--listing-cont-lines=100
157endif 163endif
164endif
158ifeq ($(VERBOSE_AS_CMD),yes) 165ifeq ($(VERBOSE_AS_CMD),yes)
159 ASFLAGS += -v 166 ASFLAGS += -v
160endif 167endif