diff options
author | Keith Packard <keithp@keithp.com> | 2013-10-08 09:22:03 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-10-08 09:22:03 -0700 |
commit | 6a1e398e590121458176758858bb4210f3eb5a55 (patch) | |
tree | 15f90c050ad470528af9f7d00ad2a7e2bb7fd47c /src/Makefile | |
parent | 16965716c02eb79b449d9d3b264814d775660134 (diff) |
Add --with parameters to configure for compiler selectionnew-state
This allows the user to specify which compiler to use for each target
CPU. Also checks to make sure the arm compiler supports -m0 and -m3
cpu type flags. The build now actually uses the specified compilers too.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/Makefile b/src/Makefile index 23cd2920..ae231c64 100644 --- a/src/Makefile +++ b/src/Makefile @@ -13,6 +13,7 @@ vpath load_csv.5c kalman vpath matrix.5c kalman include Version +include Makedefs SDCCDIRS=\ telemetrum-v1.2 telemetrum-v1.1 telemetrum-v1.0 \ @@ -23,10 +24,7 @@ SDCCDIRS=\ telefire-v0.1 telefire-v0.2 \ telemini-v2.0 -AVRDIRS=\ - telescience-v0.1 telescience-pwm micropeak nanopeak-v0.1 - -ARMDIRS=\ +ARMM3DIRS=\ telemega-v0.1 telemega-v0.1/flash-loader \ telemega-v0.3 telemega-v0.3/flash-loader \ megadongle-v0.1 megadongle-v0.1/flash-loader \ @@ -38,23 +36,26 @@ ARMDIRS=\ ARMM0DIRS=\ easymini-v1.0 easymini-v1.0/flash-loader -ifneq ($(shell which sdcc),) +AVRDIRS=\ + telescience-v0.1 telescience-pwm micropeak nanopeak-v0.1 + +ifeq ($(strip $(HAVE_SDCC)),yes) SUBDIRS += $(SDCCDIRS) endif -ifneq ($(shell which avr-gcc),) - SUBDIRS += $(AVRDIRS) +ifeq ($(strip ($HAVE_ARM_M3_CC)),yes) + SUBDIRS += $(ARMM3DIRS) endif -ifneq ($(shell which /opt/cortex/bin/arm-none-eabi-gcc),) - SUBDIRS += $(ARMDIRS) +ifneq ($(strip ($HAVE_ARM_M0_CC)),yes) + SUBDIRS += $(ARMM0DIRS) endif -ifneq ($(shell which /usr/bin/arm-none-eabi-gcc),) - SUBDIRS += $(ARMM0DIRS) +ifeq ($(strip $(HAVE_AVR_CC)),yes) + SUBDIRS += $(AVRDIRS) endif -ALLDIRS=$(SDCCDIRS) $(AVRDIRS) $(ARMDIRS) +ALLDIRS=$(SDCCDIRS) $(ARMM3DIRS) $(ARMM0DIRS) $(AVRDIRS) all: all-local all-recursive |