Commit c12f39dd authored by jdelange's avatar jdelange

* make/Makefile*

   - Auto-detect of RTEMS version



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@3835 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 92013628
......@@ -31,6 +31,24 @@ TARGET_INCLUDE = -I $(RUNTIME_PATH)/config/leon-rtems/
LD = sparc-rtems-ld
TARGET_LDFLAGS = -lrtemsbsp -lc -lm $(RUNTIME_PATH)/libs/leon/liblua.a -lm -L$(RUNTIME_PATH)/libs/leon/ -llua -lm
EXTERNAL_OBJECTS += -L$(RUNTIME_PATH)/libs/leon/ -llua -lm
RTEMS410=$(shell grep VERSION $$RTEMS_MAKEFILE_PATH_LEON/lib/include/rtems/score/cpuopts.h|grep 4.10)
RTEMS411=$(shell grep VERSION $$RTEMS_MAKEFILE_PATH_LEON/lib/include/rtems/score/cpuopts.h|grep 4.11)
RTEMS48=$(shell grep VERSION $$RTEMS_MAKEFILE_PATH_LEON/lib/include/rtems/score/cpuopts.h|grep 4.8)
ifneq ($(RTEMS48),)
TARGET_CFLAGS += -DRTEMS_VERSION=48
endif
ifneq ($(RTEMS411),)
TARGET_CFLAGS += -DRTEMS_VERSION=411
endif
ifneq ($(RTEMS410),)
TARGET_CFLAGS += -DRTEMS_VERSION=410
endif
target-clean:
......
......@@ -31,7 +31,23 @@ TARGET_INCLUDE = -I $(RUNTIME_PATH)/config/leon-rtems/
LD = sparc-rtems-ld
TARGET_LDFLAGS = -lrtemsbsp -lc -lm
EXTERNAL_OBJECTS += -L$(RUNTIME_PATH)/libs/leon/ -llua -lm
RTEMS410=$(shell grep VERSION $$RTEMS_MAKEFILE_PATH_LEON/lib/include/rtems/score/cpuopts.h|grep 4.10)
RTEMS411=$(shell grep VERSION $$RTEMS_MAKEFILE_PATH_LEON/lib/include/rtems/score/cpuopts.h|grep 4.11)
RTEMS48=$(shell grep VERSION $$RTEMS_MAKEFILE_PATH_LEON/lib/include/rtems/score/cpuopts.h|grep 4.8)
ifneq ($(RTEMS48),)
TARGET_CFLAGS += -DRTEMS_VERSION=48
endif
ifneq ($(RTEMS411),)
TARGET_CFLAGS += -DRTEMS_VERSION=411
endif
ifneq ($(RTEMS410),)
TARGET_CFLAGS += -DRTEMS_VERSION=410
endif
target-clean:
-include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
......
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