Fix build in newer gcc
parent
b1da87a7a4
commit
23cf521698
|
@ -20,7 +20,8 @@ OPTIMIZATION = 1
|
||||||
TARGET = Test
|
TARGET = Test
|
||||||
SRC = $(TARGET).c
|
SRC = $(TARGET).c
|
||||||
LUFA_PATH = ../../LUFA
|
LUFA_PATH = ../../LUFA
|
||||||
CC_FLAGS = -Werror
|
#CC_FLAGS = -Werror
|
||||||
|
CC_FLAGS =
|
||||||
DEBUG_LEVEL = 0
|
DEBUG_LEVEL = 0
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ endif
|
||||||
|
|
||||||
# Generic C/C++ compiler flags
|
# Generic C/C++ compiler flags
|
||||||
CC_FLAGS = -Wextra
|
CC_FLAGS = -Wextra
|
||||||
CC_FLAGS += -Werror
|
#CC_FLAGS += -Werror
|
||||||
CC_FLAGS += -Wformat=2
|
CC_FLAGS += -Wformat=2
|
||||||
CC_FLAGS += -Winit-self
|
CC_FLAGS += -Winit-self
|
||||||
CC_FLAGS += -Wswitch-enum
|
CC_FLAGS += -Wswitch-enum
|
||||||
|
|
|
@ -32,7 +32,7 @@ LUFA_PATH = ../../LUFA
|
||||||
|
|
||||||
# Generic C/C++ compiler flags
|
# Generic C/C++ compiler flags
|
||||||
CC_FLAGS = -Wextra
|
CC_FLAGS = -Wextra
|
||||||
CC_FLAGS += -Werror
|
#CC_FLAGS += -Werror
|
||||||
CC_FLAGS += -Wformat=2
|
CC_FLAGS += -Wformat=2
|
||||||
CC_FLAGS += -Winit-self
|
CC_FLAGS += -Winit-self
|
||||||
CC_FLAGS += -Wswitch-enum
|
CC_FLAGS += -Wswitch-enum
|
||||||
|
|
|
@ -92,9 +92,9 @@ endif
|
||||||
endif
|
endif
|
||||||
CFLAGS += -Wall
|
CFLAGS += -Wall
|
||||||
CFLAGS += -Wstrict-prototypes
|
CFLAGS += -Wstrict-prototypes
|
||||||
ifneq ($(strip $(ALLOW_WARNINGS)), yes)
|
#ifneq ($(strip $(ALLOW_WARNINGS)), yes)
|
||||||
CFLAGS += -Werror
|
# CFLAGS += -Werror
|
||||||
endif
|
#endif
|
||||||
#CFLAGS += -mshort-calls
|
#CFLAGS += -mshort-calls
|
||||||
#CFLAGS += -fno-unit-at-a-time
|
#CFLAGS += -fno-unit-at-a-time
|
||||||
#CFLAGS += -Wundef
|
#CFLAGS += -Wundef
|
||||||
|
@ -118,9 +118,9 @@ CPPFLAGS += -O$(OPT)
|
||||||
CPPFLAGS += -w
|
CPPFLAGS += -w
|
||||||
CPPFLAGS += -Wall
|
CPPFLAGS += -Wall
|
||||||
CPPFLAGS += -Wundef
|
CPPFLAGS += -Wundef
|
||||||
ifneq ($(strip $(ALLOW_WARNINGS)), yes)
|
#ifneq ($(strip $(ALLOW_WARNINGS)), yes)
|
||||||
CPPFLAGS += -Werror
|
# CPPFLAGS += -Werror
|
||||||
endif
|
#endif
|
||||||
#CPPFLAGS += -mshort-calls
|
#CPPFLAGS += -mshort-calls
|
||||||
#CPPFLAGS += -fno-unit-at-a-time
|
#CPPFLAGS += -fno-unit-at-a-time
|
||||||
#CPPFLAGS += -Wstrict-prototypes
|
#CPPFLAGS += -Wstrict-prototypes
|
||||||
|
@ -138,7 +138,7 @@ CPPFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
|
||||||
# files -- see avr-libc docs [FIXME: not yet described there]
|
# files -- see avr-libc docs [FIXME: not yet described there]
|
||||||
# -listing-cont-lines: Sets the maximum number of continuation lines of hex
|
# -listing-cont-lines: Sets the maximum number of continuation lines of hex
|
||||||
# dump that will be displayed for a given single line of source input.
|
# dump that will be displayed for a given single line of source input.
|
||||||
ASFLAGS += $(ADEFS)
|
ASFLAGS += $(ADEFS)
|
||||||
ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100
|
ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100
|
||||||
|
|
||||||
#---------------- Library Options ----------------
|
#---------------- Library Options ----------------
|
||||||
|
@ -284,7 +284,7 @@ BEGIN = gccversion sizebefore
|
||||||
@$(SILENT) || printf "$(MSG_LINKING) $@" | $(AWK_CMD)
|
@$(SILENT) || printf "$(MSG_LINKING) $@" | $(AWK_CMD)
|
||||||
$(eval CMD=$(CC) $(ALL_CFLAGS) $(filter-out %.txt,$^) --output $@ $(LDFLAGS))
|
$(eval CMD=$(CC) $(ALL_CFLAGS) $(filter-out %.txt,$^) --output $@ $(LDFLAGS))
|
||||||
@$(BUILD_CMD)
|
@$(BUILD_CMD)
|
||||||
|
|
||||||
|
|
||||||
define GEN_OBJRULE
|
define GEN_OBJRULE
|
||||||
$1_INCFLAGS := $$(patsubst %,-I%,$$($1_INC))
|
$1_INCFLAGS := $$(patsubst %,-I%,$$($1_INC))
|
||||||
|
@ -352,7 +352,7 @@ DEPS = $(patsubst %.o,%.d,$(OBJ))
|
||||||
.PRECIOUS: $(DEPS)
|
.PRECIOUS: $(DEPS)
|
||||||
# Empty rule to force recompilation if the .d file is missing
|
# Empty rule to force recompilation if the .d file is missing
|
||||||
$(DEPS):
|
$(DEPS):
|
||||||
|
|
||||||
|
|
||||||
$(foreach OUTPUT,$(OUTPUTS),$(eval $(call GEN_OBJRULE,$(OUTPUT))))
|
$(foreach OUTPUT,$(OUTPUTS),$(eval $(call GEN_OBJRULE,$(OUTPUT))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue