Commit eb52ea74 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras

Improve the Makefile

parents 046523ec b5bc5de5
Pipeline #325 skipped
......@@ -18,9 +18,9 @@ endif
# Build up our settings from our inputs and our environment
LEON ?= leon3
RTEMS ?= /opt/rtems-4.11-2016.04.01.${FPU_SUFFIX}
RTEMS_MAKEFILE_PATH = ${RTEMS}/sparc-rtems4.11/${LEON}
CROSS_PREFIX ?= sparc-rtems4.11
RTEMS_MAKEFILE_PATH = ${RTEMS}/${CROSS_PREFIX}/${LEON}
RTEMS_LIB=${RTEMS_MAKEFILE_PATH}/lib
CROSS_PREFIX=sparc-rtems4.11
# If not selected, compile debug version of binary (no optimizations)
#ifeq ($(CFG),)
......@@ -74,7 +74,7 @@ INCLUDEFLAGS= -I src
# Compilation flags (common)
COMMON += -B${RTEMS_LIB} -specs bsp_specs -qrtems \
-mcpu=cypress -DBSP_${LEON} \
-mcpu=leon3 -DBSP_${LEON} \
-ffunction-sections -fdata-sections -Wall \
-Wmissing-prototypes -Wimplicit-function-declaration \
-Wstrict-prototypes -Wnested-externs
......@@ -134,8 +134,8 @@ else
@$(CC) -g -o $@ $^ ${LDFLAGS}
endif
ifeq ($(CFG),release)
@${CROSS_PREFIX}-objcopy --only-keep-debug $@ ${@}.debug
@${CROSS_PREFIX}-strip $@
@${RTEMS}/bin/${CROSS_PREFIX}-objcopy --only-keep-debug $@ ${@}.debug
@${RTEMS}/bin/${CROSS_PREFIX}-strip $@
endif
@echo Built with RTEMS at ${RTEMS_LIB} for ${LEON}.
......
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