Additional Makefile cleanup
This commit is contained in:
parent
2047a07c0a
commit
cfbee51ff1
@ -14,14 +14,6 @@ SRC = $(wildcard $(SRC_DIR)/*.c)
|
|||||||
OBJ = $(SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o)
|
OBJ = $(SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o)
|
||||||
LST = $(SRC:$(SRC_DIR)/%.c=$(BUILD_DIR)/%.lst)
|
LST = $(SRC:$(SRC_DIR)/%.c=$(BUILD_DIR)/%.lst)
|
||||||
|
|
||||||
# Name of this Makefile (used for "make depend").
|
|
||||||
MAKEFILE = Makefile
|
|
||||||
|
|
||||||
# Debugging format.
|
|
||||||
# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
|
|
||||||
# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
|
|
||||||
DEBUG_FORMAT = stabs
|
|
||||||
|
|
||||||
# Compiler flag to set the C Standard level.
|
# Compiler flag to set the C Standard level.
|
||||||
# c89 - "ANSI" C
|
# c89 - "ANSI" C
|
||||||
# gnu89 - c89 plus GCC extensions
|
# gnu89 - c89 plus GCC extensions
|
||||||
@ -37,10 +29,15 @@ CINCS = -I $(INC_DIR)
|
|||||||
|
|
||||||
CTUNING = -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
|
CTUNING = -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
|
||||||
#CEXTRA = -Wa,-adhlns=$(<:.c=.lst)
|
#CEXTRA = -Wa,-adhlns=$(<:.c=.lst)
|
||||||
CFLAGS = $(CDEFS) $(CINCS) $(CSTANDARD) $(CEXTRA)
|
CFLAGS = $(CTUNING) $(CDEFS) $(CINCS) $(CSTANDARD) $(CEXTRA)
|
||||||
|
|
||||||
#ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
|
#ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
|
||||||
|
|
||||||
|
# Debugging format.
|
||||||
|
# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
|
||||||
|
# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
|
||||||
|
DEBUG_FORMAT = stabs
|
||||||
|
|
||||||
ifeq ($(BUILD),debug)
|
ifeq ($(BUILD),debug)
|
||||||
CFLAGS += -DDEBUG -g$(DEBUG_FORMAT)
|
CFLAGS += -DDEBUG -g$(DEBUG_FORMAT)
|
||||||
CFLAGS += -Wall -Wextra -Wformat=2 -Wswitch-default \
|
CFLAGS += -Wall -Wextra -Wformat=2 -Wswitch-default \
|
||||||
|
Loading…
Reference in New Issue
Block a user