## This file is a part of PolyORB-HI-C software. ## It sets some variables useful to compile generated ## code to the LEON platform with the RTEMS operating system. ## To use and compile RTEMS, visit http://www.rtems.com ## This file has been built for a generit RTEMS integration -include $(RTEMS_MAKEFILE_PATH)/Makefile.inc -include $(RTEMS_CUSTOM) -include $(PROJECT_ROOT)/make/leaf.cfg define bsp-post-link $(NM) -g -n $@ > $(basename $@).num $(SIZE) $@ endef MANAGERS = all LIBS = -lrtemsall -lc POHI_CFLAGS = -D__PO_HI_RTEMS_CLASSIC_API -DLEON_RTEMS $(GCC_GENERIC_FLAGS) TARGET_INCLUDE = -I$(RUNTIME_PATH)/config/leon-rtems/ TARGET_LDFLAGS = -lrtemsbsp -lc -lm ifndef RTEMS_API POHI_CFLAGS += -DRTEMS48 TARGET_LDFLAGS += -L$(RUNTIME_PATH)/libs/leon-rtems4.8/ -lm endif ifeq ($(RTEMS_API),4.8) POHI_CFLAGS += -DRTEMS48 TARGET_LDFLAGS += -L$(RUNTIME_PATH)/libs/leon-rtems4.8/ -lm endif ifeq ($(RTEMS_API),4.10) POHI_CFLAGS += -DRTEMS410 endif ifeq ($(RTEMS_API),4.11) POHI_CFLAGS += -DRTEMS411 TARGET_LDFLAGS += -L$(RUNTIME_PATH)/libs/leon-rtems4.11/ -lm endif ifeq ($(RTEMS_API),4.12) POHI_CFLAGS += -DRTEMS412 TARGET_LDFLAGS += -L$(RUNTIME_PATH)/libs/leon-rtems4.12/ -lm endif ifeq ($(RTEMS_API),5) POHI_CFLAGS += -DRTEMS412 TARGET_LDFLAGS += -L$(RUNTIME_PATH)/libs/leon-rtems4.12/ -lm endif ifeq ($(RTEMS_BSP),leon3) POHI_CFLAGS += -DGRLEON3 endif ifeq ($(RTEMS_BSP),leon2) POHI_CFLAGS += -DGRLEON2 endif target-clean: ifdef USE_GPROF TARGET_LDFLAGS+=-Wl,--wrap,Clock_isr -pg EXTERNAL_OBJECTS+=po_hi_gprof_rtems_leon.o TARGET_INCLUDE+=-I$(RTEMS_MAKEFILE_PATH)/lib/include/ target-objects: $(CC) $(INCLUDE) $(TARGET_INCLUDE) -D__PO_HI_USE_GPROF -Wall -c -o po_hi_gprof_rtems_leon.o $(RUNTIME_PATH)/src/po_hi_gprof_rtems_leon.c else target-objects: endif LINK_LIBS+=-lm emulate-qemu: $(BINARY) qemu-system-sparc -M at697 -nographic -kernel $(BINARY).exe