## 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 generic RTEMS integration MANAGERS = all LIBS = -lrtemsall -lc -include $(RTEMS_MAKEFILE_PATH)/Makefile.inc -include $(RTEMS_CUSTOM) -include $(PROJECT_ROOT)/make/leaf.cfg POHI_CFLAGS = -DRTEMS_POSIX -DLEON_RTEMS $(GCC_GENERIC_FLAGS) ############################################################################## # RTEMS_API is defined as part of RTEMS BSP Makefile. It reports the # version of RTEMS used # # The following adjusts the configuration of PolyORB-HI/C for each # variant of RTEMS. 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 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 ############################################################################## # RTEMS_BSP is defined as part of RTEMS BSP Makefile. It reports the # BSP used. # # Depending on the BSP, we select specific variant of the drivers API # GRLEON3: PolyORB-HI/C variant of the driver # LEON3: RCC 1.3 macro to enables LEON3 peripherals. ifeq ($(RTEMS_BSP),gr740) POHI_CFLAGS += -DGRLEON3 endif # gr740_smp is provided by RCC 1.3 ifeq ($(RTEMS_BSP),gr740_smp) POHI_CFLAGS += -DGRLEON3 -DLEON3 endif ifeq ($(RTEMS_BSP),leon3) POHI_CFLAGS += -DGRLEON3 -DLEON3 endif # leon3_sf is provided by RCC 1.3 ifeq ($(RTEMS_BSP),leon3_sf) POHI_CFLAGS += -DGRLEON3 -DLEON3 endif ifeq ($(RTEMS_BSP),leon2) POHI_CFLAGS += -DGRLEON2 endif 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 target-clean: