auto-sync

This commit is contained in:
rusEfi 2015-03-04 09:04:16 -06:00
parent 4a1a7901f1
commit b3f37af0bd
1 changed files with 30 additions and 34 deletions

View File

@ -4,17 +4,18 @@
#
PROJECT_DIR = .
CHIBIOS = chibios
# Compiler options here.
ifeq ($(USE_OPT),)
# USE_OPT = -O2 -ggdb -std=gnu99 -fomit-frame-pointer -falign-functions=16
# USE_OPT = $(RFLAGS) -O1 -fgnu89-inline -ggdb -fomit-frame-pointer -falign-functions=16 -std=gnu99 -Werror-implicit-function-declaration -Werror -Wno-error=pointer-sign -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=sign-compare -Wno-error=unused-parameter -Wno-error=missing-field-initializers
USE_OPT = $(RFLAGS) -O1 -fgnu89-inline -fomit-frame-pointer -falign-functions=16 -std=gnu99 -Werror-implicit-function-declaration -Werror -Wno-error=pointer-sign -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=sign-compare -Wno-error=unused-parameter -Wno-error=missing-field-initializers -Werror=type-limits
USE_OPT = $(RFLAGS) -O2 -fomit-frame-pointer -falign-functions=16 -Werror-implicit-function-declaration -Werror -Wno-error=pointer-sign -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=sign-compare -Wno-error=unused-parameter -Wno-error=missing-field-initializers -Werror=type-limits -Wno-error=strict-aliasing -Wno-error=attributes
endif
# C specific options here (added to USE_OPT).
ifeq ($(USE_COPT),)
USE_COPT =
USE_COPT = -fgnu89-inline -std=gnu99
endif
# C++ specific options here (added to USE_OPT).
@ -27,6 +28,16 @@ ifeq ($(USE_LINK_GC),)
USE_LINK_GC = yes
endif
# Linker extra options here.
ifeq ($(USE_LDOPT),)
USE_LDOPT =
endif
# Enable this if you want link time optimizations (LTO)
ifeq ($(USE_LTO),)
USE_LTO = no
endif
# If enabled, this option allows to compile the application in THUMB mode.
ifeq ($(USE_THUMB),)
USE_THUMB = yes
@ -45,22 +56,13 @@ endif
# Architecture or project specific options
#
USE_FPU = yes
USE_FPU = softfp
# Enables the use of FPU on Cortex-M4.
# Enable this if you really want to use the STM FWLib.
# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),)
USE_FPU = no
endif
# Enable this if you really want to use the STM FWLib.
ifeq ($(USE_FWLIB),)
USE_FWLIB = no
endif
# List all default C defines here, like -D_DEBUG=1
DDEFS =
#
# Architecture or project specific options
##############################################################################
@ -72,19 +74,24 @@ DDEFS =
# Define project name here
PROJECT = rusefi
# Imported source files and paths
CHIBIOS = chibios
#include $(CHIBIOS)/test/test.mk
#PROJECT_BOARD = OLIMEX_STM32_E407
ifneq ($(PROJECT_BOARD),OLIMEX_STM32_E407)
PROJECT_BOARD = ST_STM32F4_DISCOVERY
endif
DDEFS += -D$(PROJECT_BOARD)
# Imported source files and paths
include $(CHIBIOS)/boards/$(PROJECT_BOARD)/board.mk
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
include $(CHIBIOS)/os/various/cpp_wrappers/kernel.mk
#include $(CHIBIOS)/os/various/cpp_wrappers/kernel.mk
include $(CHIBIOS)/os/various/fatfs_bindings/fatfs.mk
include console/tunerstudio/tunerstudio.mk
@ -206,7 +213,6 @@ INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
controllers/core \
controllers/math \
controllers/trigger
#
# Project, sources and paths
@ -225,11 +231,12 @@ CPPC = $(TRGT)g++
# Enable loading with g++ only if you need C++ runtime support.
# NOTE: You can use C++ even without C++ support if you are careful. C++
# runtime support makes code size explode.
#LD = $(TRGT)gcc
LD = $(TRGT)g++
LD = $(TRGT)gcc
#LD = $(TRGT)g++
CP = $(TRGT)objcopy
AS = $(TRGT)gcc -x assembler-with-cpp
OD = $(TRGT)objdump
SZ = $(TRGT)size
HEX = $(CP) -O ihex
BIN = $(CP) -O binary
@ -253,6 +260,9 @@ CPPWARN = -Wall -Wextra
# Start of default section
#
# List all default C defines here, like -D_DEBUG=1
DDEFS =
# List all default ASM defines here, like -D_DEBUG=1
DADEFS =
@ -292,19 +302,5 @@ ULIBS = -lm
# End of user defines
##############################################################################
ifeq ($(USE_FPU),yes)
USE_OPT += -mfloat-abi=softfp -mfpu=fpv4-sp-d16
USE_CPPOPT += -mfloat-abi=softfp -mfpu=fpv4-sp-d16
DDEFS += -DCORTEX_USE_FPU=TRUE
else
DDEFS += -DCORTEX_USE_FPU=FALSE
endif
ifeq ($(USE_FWLIB),yes)
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
CSRC += $(STM32SRC)
INCDIR += $(STM32INC)
USE_OPT += -DUSE_STDPERIPH_DRIVER
endif
include $(CHIBIOS)/os/ports/GCC/ARMCMx/rules.mk
RULESPATH = $(CHIBIOS)/os/ports/GCC/ARMCMx
include $(RULESPATH)/rules.mk