mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-18 07:52:14 +01:00
[sam] fixing variants names following Cristian renaming
This commit is contained in:
parent
aa3dde0973
commit
d1c8c5db3a
@ -1,6 +1,6 @@
|
||||
ifeq ("$(VARIANTS)", "")
|
||||
VARIANTS = sam3s_ek sam3u_ek arduino_due
|
||||
#VARIANTS = sam3u_ek
|
||||
VARIANTS = arduino_due_x
|
||||
#VARIANTS = sam3u_ek sam3s_ek sam3x_ek arduino_due_u
|
||||
endif
|
||||
|
||||
SUBMAKE_OPTIONS=--no-builtin-rules --no-builtin-variables
|
||||
@ -23,11 +23,23 @@ sam3u_ek:
|
||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libarduino_sam3u_ek.mk
|
||||
# @$(MAKE) $(SUBMAKE_OPTIONS) -f libarduino_sam3u_ek.mk
|
||||
|
||||
.PHONY: arduino_due
|
||||
arduino_due:
|
||||
@echo --- Making arduino_due
|
||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libarduino_arduino_due.mk
|
||||
# @$(MAKE) $(SUBMAKE_OPTIONS) -f libarduino_arduino_due.mk
|
||||
.PHONY: sam3x_ek
|
||||
sam3x_ek:
|
||||
@echo --- Making sam3x_ek
|
||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libarduino_sam3x_ek.mk
|
||||
# @$(MAKE) $(SUBMAKE_OPTIONS) -f libarduino_sam3x_ek.mk
|
||||
|
||||
.PHONY: arduino_due_u
|
||||
arduino_due_u:
|
||||
@echo --- Making arduino_due_u
|
||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libarduino_arduino_due_u.mk
|
||||
# @$(MAKE) $(SUBMAKE_OPTIONS) -f libarduino_arduino_due_u.mk
|
||||
|
||||
.PHONY: arduino_due_x
|
||||
arduino_due_x:
|
||||
@echo --- Making arduino_due_x
|
||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libarduino_arduino_due_x.mk
|
||||
# @$(MAKE) $(SUBMAKE_OPTIONS) -f libarduino_arduino_due_x.mk
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@ -39,8 +51,16 @@ clean:
|
||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libarduino_sam3u_ek.mk $@
|
||||
# @$(MAKE) $(SUBMAKE_OPTIONS) -f libarduino_sam3u_ek.mk $@
|
||||
|
||||
@echo --- Cleaning arduino_due
|
||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libarduino_arduino_due.mk $@
|
||||
# @$(MAKE) $(SUBMAKE_OPTIONS) -f libarduino_arduino_due.mk $@
|
||||
@echo --- Cleaning sam3x_ek
|
||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libarduino_sam3x_ek.mk $@
|
||||
# @$(MAKE) $(SUBMAKE_OPTIONS) -f libarduino_sam3x_ek.mk $@
|
||||
|
||||
@echo --- Cleaning arduino_due_u
|
||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libarduino_arduino_due_u.mk $@
|
||||
# @$(MAKE) $(SUBMAKE_OPTIONS) -f libarduino_arduino_due_u.mk $@
|
||||
|
||||
@echo --- Cleaning arduino_due_x
|
||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libarduino_arduino_due_x.mk $@
|
||||
# @$(MAKE) $(SUBMAKE_OPTIONS) -f libarduino_arduino_due_x.mk $@
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
.SUFFIXES: .o .a .c .s
|
||||
|
||||
CHIP=__SAM3U4E__
|
||||
VARIANT=arduino_due
|
||||
VARIANT=arduino_due_u
|
||||
LIBNAME=libarduino_$(VARIANT)
|
||||
TOOLCHAIN=gcc
|
||||
|
@ -0,0 +1,152 @@
|
||||
# Makefile for compiling libArduino
|
||||
.SUFFIXES: .o .a .c .s
|
||||
|
||||
CHIP=__SAM3X8E__
|
||||
VARIANT=arduino_due_x
|
||||
LIBNAME=libarduino_$(VARIANT)
|
||||
TOOLCHAIN=gcc
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Path
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
# Output directories
|
||||
#OUTPUT_BIN = ../lib
|
||||
OUTPUT_BIN = ..
|
||||
|
||||
# Libraries
|
||||
PROJECT_BASE_PATH = ..
|
||||
SYSTEM_PATH = ../../../system
|
||||
CMSIS_PATH = $(SYSTEM_PATH)/CMSIS/Include
|
||||
VARIANT_PATH = ../../../variants/$(VARIANT)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Files
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
vpath %.h $(PROJECT_BASE_PATH) $(SYSTEM_PATH) $(VARIANT_PATH)
|
||||
vpath %.c $(PROJECT_BASE_PATH) $(VARIANT_PATH)
|
||||
vpath %.cpp $(PROJECT_BASE_PATH) $(PROJECT_BASE_PATH)
|
||||
|
||||
VPATH+=$(PROJECT_BASE_PATH)
|
||||
|
||||
INCLUDES =
|
||||
INCLUDES += -I$(PROJECT_BASE_PATH)
|
||||
INCLUDES += -I$(SYSTEM_PATH)
|
||||
INCLUDES += -I$(SYSTEM_PATH)/libsam
|
||||
INCLUDES += -I$(VARIANT_PATH)
|
||||
INCLUDES += -I$(CMSIS_PATH)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
ifdef DEBUG
|
||||
include debug.mk
|
||||
else
|
||||
include release.mk
|
||||
endif
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Tools
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
include $(TOOLCHAIN).mk
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
ifdef DEBUG
|
||||
OUTPUT_OBJ=debug
|
||||
OUTPUT_LIB=$(LIBNAME)_$(TOOLCHAIN)_dbg.a
|
||||
else
|
||||
OUTPUT_OBJ=release
|
||||
OUTPUT_LIB=$(LIBNAME)_$(TOOLCHAIN)_rel.a
|
||||
endif
|
||||
|
||||
OUTPUT_PATH=$(OUTPUT_OBJ)_$(VARIANT)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# C source files and objects
|
||||
#-------------------------------------------------------------------------------
|
||||
C_SRC=$(wildcard $(PROJECT_BASE_PATH)/*.c)
|
||||
|
||||
C_OBJ_TEMP = $(patsubst %.c, %.o, $(notdir $(C_SRC)))
|
||||
|
||||
# during development, remove some files
|
||||
C_OBJ_FILTER=dlib_lowlevel_sam3.o
|
||||
|
||||
C_OBJ=$(filter-out $(C_OBJ_FILTER), $(C_OBJ_TEMP))
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# CPP source files and objects
|
||||
#-------------------------------------------------------------------------------
|
||||
CPP_SRC=$(wildcard $(PROJECT_BASE_PATH)/*.cpp)
|
||||
|
||||
CPP_OBJ_TEMP = $(patsubst %.cpp, %.o, $(notdir $(CPP_SRC)))
|
||||
|
||||
# during development, remove some files
|
||||
CPP_OBJ_FILTER=
|
||||
|
||||
CPP_OBJ=$(filter-out $(CPP_OBJ_FILTER), $(CPP_OBJ_TEMP))
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Assembler source files and objects
|
||||
#-------------------------------------------------------------------------------
|
||||
A_SRC=$(wildcard $(PROJECT_BASE_PATH)/*.s)
|
||||
|
||||
A_OBJ_TEMP=$(patsubst %.s, %.o, $(notdir $(A_SRC)))
|
||||
|
||||
# during development, remove some files
|
||||
A_OBJ_FILTER=
|
||||
|
||||
A_OBJ=$(filter-out $(A_OBJ_FILTER), $(A_OBJ_TEMP))
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Rules
|
||||
#-------------------------------------------------------------------------------
|
||||
all: $(VARIANT)
|
||||
|
||||
$(VARIANT): create_output $(OUTPUT_LIB)
|
||||
|
||||
.PHONY: create_output
|
||||
create_output:
|
||||
@echo --- Preparing $(VARIANT) files in $(OUTPUT_PATH) $(OUTPUT_BIN)
|
||||
@echo -------------------------
|
||||
@echo *$(INCLUDES)
|
||||
@echo -------------------------
|
||||
@echo *$(C_SRC)
|
||||
@echo -------------------------
|
||||
@echo *$(C_OBJ)
|
||||
@echo -------------------------
|
||||
@echo *$(addprefix $(OUTPUT_PATH)/, $(C_OBJ))
|
||||
@echo -------------------------
|
||||
@echo *$(CPP_SRC)
|
||||
@echo -------------------------
|
||||
@echo *$(CPP_OBJ)
|
||||
@echo -------------------------
|
||||
@echo *$(addprefix $(OUTPUT_PATH)/, $(CPP_OBJ))
|
||||
@echo -------------------------
|
||||
@echo *$(A_SRC)
|
||||
@echo -------------------------
|
||||
|
||||
# -@mkdir $(subst /,$(SEP),$(OUTPUT_BIN)) 1>NUL 2>&1
|
||||
-mkdir $(subst /,$(SEP),$(OUTPUT_BIN))
|
||||
-@mkdir $(OUTPUT_PATH) 1>NUL 2>&1
|
||||
|
||||
$(addprefix $(OUTPUT_PATH)/,$(C_OBJ)): $(OUTPUT_PATH)/%.o: %.c
|
||||
# @$(CC) -v -c $(CFLAGS) $< -o $@
|
||||
@$(CC) -c $(CFLAGS) $< -o $@
|
||||
|
||||
$(addprefix $(OUTPUT_PATH)/,$(CPP_OBJ)): $(OUTPUT_PATH)/%.o: %.cpp
|
||||
# @$(CC) -c $(CPPFLAGS) $< -o $@
|
||||
@$(CC) -xc++ -c $(CPPFLAGS) $< -o $@
|
||||
|
||||
$(addprefix $(OUTPUT_PATH)/,$(A_OBJ)): $(OUTPUT_PATH)/%.o: %.s
|
||||
@$(AS) -c $(ASFLAGS) $< -o $@
|
||||
|
||||
$(OUTPUT_LIB): $(addprefix $(OUTPUT_PATH)/, $(C_OBJ)) $(addprefix $(OUTPUT_PATH)/, $(CPP_OBJ)) $(addprefix $(OUTPUT_PATH)/, $(A_OBJ))
|
||||
@$(AR) -v -r "$(OUTPUT_BIN)/$@" $^
|
||||
@$(NM) "$(OUTPUT_BIN)/$@" > "$(OUTPUT_BIN)/$@.txt"
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@echo --- Cleaning $(VARIANT) files [$(OUTPUT_PATH)$(SEP)*.o]
|
||||
-@$(RM) $(OUTPUT_PATH) 1>NUL 2>&1
|
||||
-@$(RM) $(OUTPUT_BIN)/$(OUTPUT_LIB) 1>NUL 2>&1
|
@ -25,18 +25,18 @@ SUBMAKE_OPTIONS=--no-builtin-rules --no-builtin-variables
|
||||
# Rules
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
all: arduino_due
|
||||
all: arduino_due_u
|
||||
|
||||
.PHONY: arduino_due
|
||||
arduino_due:
|
||||
@echo --- Making arduino_due
|
||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libvariant_arduino_due.mk
|
||||
.PHONY: arduino_due_u
|
||||
arduino_due_u:
|
||||
@echo --- Making arduino_due_u
|
||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libvariant_arduino_due_u.mk
|
||||
# @$(MAKE) $(SUBMAKE_OPTIONS) -f libvariant_arduino_due.mk
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@echo --- Cleaning arduino_due
|
||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libvariant_arduino_due.mk $@
|
||||
@echo --- Cleaning arduino_due_u
|
||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libvariant_arduino_due_u.mk $@
|
||||
# @$(MAKE) $(SUBMAKE_OPTIONS) -f libvariant_arduino_due.mk $@
|
||||
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
.SUFFIXES: .o .a .c .s
|
||||
|
||||
CHIP=__SAM3U4E__
|
||||
VARIANT=arduino_due
|
||||
VARIANT=arduino_due_u
|
||||
LIBNAME=libvariant_$(VARIANT)
|
||||
TOOLCHAIN=gcc
|
||||
|
@ -25,18 +25,18 @@ SUBMAKE_OPTIONS=--no-builtin-rules --no-builtin-variables
|
||||
# Rules
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
all: arduino_due
|
||||
all: arduino_due_x
|
||||
|
||||
.PHONY: arduino_due
|
||||
arduino_due:
|
||||
@echo --- Making arduino_due
|
||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libvariant_arduino_due.mk
|
||||
.PHONY: arduino_due_x
|
||||
arduino_due_x:
|
||||
@echo --- Making arduino_due_x
|
||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libvariant_arduino_due_x.mk
|
||||
# @$(MAKE) $(SUBMAKE_OPTIONS) -f libvariant_arduino_due.mk
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@echo --- Cleaning arduino_due
|
||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libvariant_arduino_due.mk $@
|
||||
@echo --- Cleaning arduino_due_x
|
||||
@$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libvariant_arduino_due_x.mk $@
|
||||
# @$(MAKE) $(SUBMAKE_OPTIONS) -f libvariant_arduino_due.mk $@
|
||||
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
.SUFFIXES: .o .a .c .s
|
||||
|
||||
CHIP=__SAM3U4E__
|
||||
VARIANT=arduino_due
|
||||
VARIANT=arduino_due_x
|
||||
LIBNAME=libvariant_$(VARIANT)
|
||||
TOOLCHAIN=gcc
|
||||
|
Loading…
x
Reference in New Issue
Block a user