diff options
author | Christian Pointner <equinox@spreadspace.org> | 2015-02-24 16:29:39 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2015-02-24 16:29:39 +0100 |
commit | c6f3627eb20df13a023fb82cb33afe482f8f34be (patch) | |
tree | 0aafa42906a969fd7b9aa5dc63a8952a6aafcd4e | |
parent | refactored newly imported r3cam-steppermotoer (diff) |
introduced path variable for avr utilities path
-rw-r--r-- | defines.mk | 20 | ||||
-rw-r--r-- | include.mk | 11 | ||||
-rw-r--r-- | lufa.mk | 2 |
3 files changed, 18 insertions, 15 deletions
@@ -59,7 +59,7 @@ ifeq ($(BOARD_TYPE),minimus) F_USB = $(F_CPU) PROG := DFU LUFA_BOARD = MINIMUS - RESET_FUNC := ../tools/reset_minimus + RESET_FUNC := $(SPREADAVR_PATH)/tools/reset_minimus RESET_PARAM = "03eb:2ffa" endif ifeq ($(BOARD_TYPE),minimus32) @@ -69,7 +69,7 @@ ifeq ($(BOARD_TYPE),minimus32) F_USB = $(F_CPU) PROG := DFU LUFA_BOARD = MINIMUS - RESET_FUNC := ../tools/reset_minimus + RESET_FUNC := $(SPREADAVR_PATH)/tools/reset_minimus RESET_PARAM = "03eb:2ff0" endif ifeq ($(BOARD_TYPE),hhd70dongle) @@ -136,7 +136,7 @@ ifeq ($(BOARD_TYPE),arduinoUno) UPLOAD_RATE := 57600 PROG_TYPE := stk500v1 AVRDUDE_PORT := /dev/ttyUSB0 - RESET_FUNC := ../tools/reset_arduino + RESET_FUNC := $(SPREADAVR_PATH)/tools/reset_arduino RESET_PARAM = $(AVRDUDE_PORT) endif ifeq ($(BOARD_TYPE),arduino2009v2) @@ -147,7 +147,7 @@ ifeq ($(BOARD_TYPE),arduino2009v2) UPLOAD_RATE := 57600 PROG_TYPE := stk500v1 AVRDUDE_PORT := /dev/ttyUSB0 - RESET_FUNC := ../tools/reset_arduino + RESET_FUNC := $(SPREADAVR_PATH)/tools/reset_arduino RESET_PARAM = $(AVRDUDE_PORT) endif ifeq ($(BOARD_TYPE),arduino2009) @@ -158,7 +158,7 @@ ifeq ($(BOARD_TYPE),arduino2009) UPLOAD_RATE := 19200 PROG_TYPE := stk500v1 AVRDUDE_PORT := /dev/ttyUSB0 - RESET_FUNC := ../tools/reset_arduino + RESET_FUNC := $(SPREADAVR_PATH)/tools/reset_arduino RESET_PARAM = $(AVRDUDE_PORT) endif ifeq ($(BOARD_TYPE),arduino10000) @@ -169,7 +169,7 @@ ifeq ($(BOARD_TYPE),arduino10000) UPLOAD_RATE := 19200 PROG_TYPE := stk500v1 AVRDUDE_PORT := /dev/ttyUSB0 - RESET_FUNC := ../tools/reset_arduino + RESET_FUNC := $(SPREADAVR_PATH)/tools/reset_arduino RESET_PARAM = $(AVRDUDE_PORT) endif ifeq ($(BOARD_TYPE),arduinoNG) @@ -180,7 +180,7 @@ ifeq ($(BOARD_TYPE),arduinoNG) UPLOAD_RATE := 19200 PROG_TYPE := stk500v1 AVRDUDE_PORT := /dev/ttyUSB0 - RESET_FUNC := ../tools/reset_dummy + RESET_FUNC := $(SPREADAVR_PATH)/tools/reset_dummy endif ifeq ($(BOARD_TYPE),AvrNetIo) MCU := atmega32 @@ -197,7 +197,7 @@ OBJCOPY = avr-objcopy AR = avr-ar rcs SIZE = avr-size -LIB_DIR = ../lib +LIB_DIR = $(SPREADAVR_PATH)/lib DFU = dfu-programmer teensy = teensy_loader_cli @@ -207,7 +207,7 @@ avrdude = avrdude COMMON = -mmcu=$(MCU) ## Compile options common for all C compilation units. -CFLAGS = $(COMMON) +CFLAGS = $(COMMON) CFLAGS += -O2 CFLAGS += -funsigned-char CFLAGS += -funsigned-bitfields @@ -225,4 +225,4 @@ CFLAGS += -std=c99 ## Linker flags LDFLAGS = $(COMMON) -LDFLAGS += +LDFLAGS += @@ -20,7 +20,10 @@ ## along with spreadspace avr utils. If not, see <http://www.gnu.org/licenses/>. ## -include ../defines.mk +ifndef SPREADAVR_PATH +SPREADAVR_PATH := .. +endif +include $(SPREADAVR_PATH)/defines.mk ## project-specific objects SRC := $(OBJ:%.o=%.c) @@ -55,12 +58,12 @@ build-lufa: liblufa.a liblufa.a: Makefile @echo "building external LUFA lib ($(LUFA_PATH))" - make -f ../lufa.mk liblufa.a - make -f ../lufa.mk clean + make -f $(SPREADAVR_PATH)/lufa.mk liblufa.a + make -f $(SPREADAVR_PATH)/lufa.mk clean clean-lufa: @echo "cleaning external LUFA lib ($(LUFA_PATH))" - make -f ../lufa.mk clean + make -f $(SPREADAVR_PATH)/lufa.mk clean rm -f liblufa.a @@ -20,7 +20,7 @@ ## along with spreadspace avr utils. If not, see <http://www.gnu.org/licenses/>.
##
-include ../defines.mk
+include $(SPREADAVR_PATH)/defines.mk
include $(LUFA_PATH)/LUFA/makefile
SRC:=$(foreach COMP,$(LUFA_COMPONENTS),$(LUFA_SRC_$(COMP)))
|