Commit eb433a0a authored by Thanassis Tsiodras's avatar Thanassis Tsiodras

Use better names for the parameters (support zynq7000 builds as well).

parent d5521483
......@@ -7,7 +7,7 @@ ifeq ($(FPU),)
FPU=0
endif
# To be able to properly handle any combination of (FPU, LEON, release)
# To be able to properly handle any combination of (FPU, BSP, release)
# options, create a SUFFIX (see below) to differentiate output folders
ifeq ($(FPU),1)
FPU_SUFFIX=FPU
......@@ -16,10 +16,11 @@ FPU_SUFFIX=NONFPU
endif
# Build up our settings from our inputs and our environment
LEON ?= leon3
CPU ?= cypress
BSP ?= leon3
CROSS_PREFIX ?= sparc-rtems4.12
RTEMS ?= /opt/rtems-4.12
RTEMS_MAKEFILE_PATH = ${RTEMS}/${CROSS_PREFIX}/${LEON}
RTEMS_MAKEFILE_PATH = ${RTEMS}/${CROSS_PREFIX}/${BSP}
RTEMS_LIB=${RTEMS_MAKEFILE_PATH}/lib
# If not selected, compile debug version of binary (no optimizations)
......@@ -43,7 +44,7 @@ SRC= \
common.c \
memcheck.c
SUFFIX=$(CFG).$(FPU_SUFFIX).$(LEON)
SUFFIX=$(CFG).$(FPU_SUFFIX).$(BSP)
# Build a Dependency list and an Object list, by replacing the .c
# extension to .d for dependency files, and .o for object files.
......@@ -65,7 +66,7 @@ INCLUDEFLAGS= -I src
# Compilation flags (common)
COMMON += -B${RTEMS_LIB} -specs bsp_specs -qrtems \
-mcpu=cypress -DBSP_${LEON} \
-mcpu=${CPU} -DBSP_${BSP} \
-ffunction-sections -fdata-sections -Wall \
-Wmissing-prototypes -Wimplicit-function-declaration \
-Wstrict-prototypes -Wnested-externs
......@@ -96,10 +97,10 @@ ifneq ($(CFG),debug)
@echo " "
@echo "You must specify a configuration when running make, e.g."
@echo " "
@echo " make CFG=debug LEON=leon3 FPU=1 V=1"
@echo " make CFG=debug BSP=leon3 FPU=1 V=1"
@echo " "
@echo "- Possible choices for CFG are 'release' and 'debug'"
@echo "- Possible choices for LEON are 'leon2' and 'leon3' (default)"
@echo "- Possible choices for BSP are 'leon2' and 'leon3' (default)"
@echo "- Possible choices for FPU are '1' (native) and '0' (emulated) (default)"
@echo "- Possible choices for V are '1' (show commands) and '0' (silent) (default)"
@echo " "
......@@ -120,7 +121,7 @@ ifeq ($(CFG),release)
@${RTEMS}/bin/${CROSS_PREFIX}-objcopy --only-keep-debug $@ ${@}.debug
@${RTEMS}/bin/${CROSS_PREFIX}-strip $@
endif
@echo Built with RTEMS at ${RTEMS_LIB} for ${LEON}.
@echo Built with RTEMS at ${RTEMS_LIB} for ${BSP}.
objs.$(SUFFIX)/%.o: %.c | src/version.h
@mkdir -p $(dir $@)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment