# Object files directory
# To put object files in current directory, use a dot (.), do NOT make
# this an empty or blank macro!
-OBJDIR = obj
+OBJDIR = obj_$(TARGET)
# Optimization level, can be [0, 1, 2, 3, s].
CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
CFLAGS += $(CSTANDARD)
-CFLAGS += -include config.h
+CFLAGS += -include $(CONFIG_H)
#---------------- Compiler Options C++ ----------------
CPPFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
#CPPFLAGS += $(CSTANDARD)
-CPPFLAGS += -include config.h
+CPPFLAGS += -include $(CONFIG_H)
#---------------- Assembler Options ----------------
# -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.
ASFLAGS = $(ADEFS) -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100
-ASFLAGS += -include config.h
+ASFLAGS += -include $(CONFIG_H)
#---------------- Library Options ----------------
SIZE = avr-size
AR = avr-ar rcs
NM = avr-nm
-AVRDUDE = avrdude
REMOVE = rm -f
REMOVEDIR = rmdir
COPY = cp
# Program the device.
program: $(TARGET).hex $(TARGET).eep
- $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
+ $(PROGRAM_CMD)
# Generate avr-gdb config/init file which does the following: