Additional Makefile cleanup

This commit is contained in:
Rihards Skuja 2018-01-20 22:27:52 +02:00
parent 2047a07c0a
commit cfbee51ff1
No known key found for this signature in database
GPG Key ID: 53FA13A3F7F8571B

View File

@ -14,14 +14,6 @@ SRC = $(wildcard $(SRC_DIR)/*.c)
OBJ = $(SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o)
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.
# c89 - "ANSI" C
# gnu89 - c89 plus GCC extensions
@ -37,10 +29,15 @@ CINCS = -I $(INC_DIR)
CTUNING = -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
#CEXTRA = -Wa,-adhlns=$(<:.c=.lst)
CFLAGS = $(CDEFS) $(CINCS) $(CSTANDARD) $(CEXTRA)
CFLAGS = $(CTUNING) $(CDEFS) $(CINCS) $(CSTANDARD) $(CEXTRA)
#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)
CFLAGS += -DDEBUG -g$(DEBUG_FORMAT)
CFLAGS += -Wall -Wextra -Wformat=2 -Wswitch-default \