Commit 5037f229 authored by jhugues's avatar jhugues
Browse files

* Added missing targets for the native case



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@6264 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 75eef350
# This is a part of PolyORB-HI-C distribution, a minimal # This is a part of PolyORB-HI-C distribution, a minimal
# middleware written for generated code from AADL models. # middleware written for generated code from AADL models.
# You should use it with the Ocarina toolsuite. # You should use it with the Ocarina toolsuite.
#
# For more informations, please visit http://ocarina.enst.fr
#
# Copyright (C) 2010-2011, European Space Agency (ESA).
#
GCC_GENERIC_CFLAGS=-Wall -g GCC_GENERIC_CFLAGS=-Wall -g
...@@ -14,7 +9,7 @@ all: build-node ...@@ -14,7 +9,7 @@ all: build-node
include $(RUNTIME_PATH)/make/Makefile.$(TARGET) include $(RUNTIME_PATH)/make/Makefile.$(TARGET)
-include ../../userdefined.mk -include ../../userdefined.mk
build-node: generate-asn1-deployment compile-c-files compile-ada-files compile-node generate-doc build-node: compile-node generate-doc
################################################################################ ################################################################################
# Configuration # Configuration
...@@ -37,8 +32,6 @@ ifneq ($(USER_LD),) ...@@ -37,8 +32,6 @@ ifneq ($(USER_LD),)
LD=$(USER_LD) LD=$(USER_LD)
endif endif
GCC=$(CC)
CFLAGS=$(USER_CFLAGS) $(TARGET_CFLAGS) CFLAGS=$(USER_CFLAGS) $(TARGET_CFLAGS)
CPPFLAGS=$(CFLAGS) $(USER_CPPFLAGS) CPPFLAGS=$(CFLAGS) $(USER_CPPFLAGS)
LDFLAGS=$(TARGET_LDFLAGS) $(USER_LDFLAGS) LDFLAGS=$(TARGET_LDFLAGS) $(USER_LDFLAGS)
...@@ -127,7 +120,7 @@ else ...@@ -127,7 +120,7 @@ else
po_hi_protected.o \ po_hi_protected.o \
po_hi_monitor.o \ po_hi_monitor.o \
po_hi_storage.o \ po_hi_storage.o \
po_hi_main.o po_hi_main.o
GENERATED_OBJS = \ GENERATED_OBJS = \
activity.o \ activity.o \
...@@ -139,7 +132,7 @@ endif ...@@ -139,7 +132,7 @@ endif
ifeq ($(TARGET), $(filter $(TARGET), linux32 linux64 linux32-xenomai-posix linux32-xenomai-native)) ifeq ($(TARGET), $(filter $(TARGET), linux32 linux64 linux32-xenomai-posix linux32-xenomai-native))
PO_HI_OBJS += po_hi_lua.o PO_HI_OBJS += po_hi_lua.o
endif endif
ifeq ($(USE_ASN1_DEPLOYMENT), yes) ifeq ($(USE_ASN1_DEPLOYMENT), yes)
...@@ -178,7 +171,7 @@ ifdef SIMULINK_DIR ...@@ -178,7 +171,7 @@ ifdef SIMULINK_DIR
-I$(SIMULINK_DIRECTORY)/extern/include \ -I$(SIMULINK_DIRECTORY)/extern/include \
-I$(SIMULINK_DIRECTORY)/rtw/c/src \ -I$(SIMULINK_DIRECTORY)/rtw/c/src \
-I$(SIMULINK_DIRECTORY)/rtw/c/src/ext_mode/common \ -I$(SIMULINK_DIRECTORY)/rtw/c/src/ext_mode/common \
-I$(SIMULINK_DIRECTORY)/rtw/c/libsrc -I$(SIMULINK_DIRECTORY)/rtw/c/libsrc
CFLAGS += -DRT -DUSE_RTMODEL -DMODEL=$(SIMULINK_NODE) -DRT -DNUMST=2 -DTID01EQ=1 -DNCSTATES=0 -DUNIX -DMT=0 -DHAVESTDIO CFLAGS += -DRT -DUSE_RTMODEL -DMODEL=$(SIMULINK_NODE) -DRT -DNUMST=2 -DTID01EQ=1 -DNCSTATES=0 -DUNIX -DMT=0 -DHAVESTDIO
LDFLAGS += $(SIMULINK_LDFLAGS) LDFLAGS += $(SIMULINK_LDFLAGS)
endif endif
...@@ -191,15 +184,6 @@ ifdef SCADE_DIR ...@@ -191,15 +184,6 @@ ifdef SCADE_DIR
USER_OBJS += $(SCADE_DIR)/*.o USER_OBJS += $(SCADE_DIR)/*.o
endif endif
################################################################################
# General RTEMS stuff
check-rtems:
if [ ! -d $$RTEMS_MAKEFILE_PATH/make ]; then \
echo "Please define the RTEMS_MAKEFILE_PATH variable [currently set to \"$(RTEMS_MAKEFILE_PATH)\"]" && exit 2 ; \
fi
################################################################################ ################################################################################
# General LINUXTASTE stuff # General LINUXTASTE stuff
check-linuxtaste: check-linuxtaste:
...@@ -208,9 +192,6 @@ check-linuxtaste: ...@@ -208,9 +192,6 @@ check-linuxtaste:
echo "It should point to the directory where the distro was built" && exit 2 ; \ echo "It should point to the directory where the distro was built" && exit 2 ; \
fi fi
################################################################################ ################################################################################
# General compilation rules # General compilation rules
...@@ -236,21 +217,26 @@ endif ...@@ -236,21 +217,26 @@ endif
compile-node: $(BINARY) compile-node: $(BINARY)
ifeq ($(TARGET), $(filter $(TARGET), leon3-scoc3 leon.rtems leon.rtems_posix)) ifeq ($(TARGET), $(filter $(TARGET), leon3-scoc3 leon.rtems leon.rtems_posix))
OBJS = $(USER_OBJS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(EXTERNAL_OBJECTS) OBJS = $(USER_OBJS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(EXTERNAL_OBJECTS)
$(BINARY): generate-asn1-deployment target-objects check-rtems compile-po-hi $(USER_OBJS) $(GENERATED_OBJS) $(BINARY):
$(CC) -o $(BINARY) $(EXTERNAL_OBJECTS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(USER_OBJS) $(LDFLAGS) $(CFLAGS) @if [ ! -d $$RTEMS_MAKEFILE_PATH/make ]; then \
echo "Please define the RTEMS_MAKEFILE_PATH variable, exiting" ; \
else \
$(MAKE) generate-asn1-deployment compile-c-files compile-ada-files target-objects compile-po-hi $(USER_OBJS) $(GENERATED_OBJS) ; \
$(CC) -o $(BINARY) $(EXTERNAL_OBJECTS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(USER_OBJS) $(LDFLAGS) $(CFLAGS) ; \
fi
endif endif
ifeq ($(TARGET), leon3-xm3) ifeq ($(TARGET), leon3-xm3)
$(BINARY): $(BINARY):
OBJS = $(USER_OBJS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(EXTERNAL_OBJECTS) OBJS = $(USER_OBJS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(EXTERNAL_OBJECTS)
$(BINARY): generate-asn1-deployment target-objects check-rtems compile-po-hi $(USER_OBJS) $(GENERATED_OBJS) $(BINARY): generate-asn1-deployment target-objects check-rtems compile-po-hi $(USER_OBJS) $(GENERATED_OBJS)
$(make-exe) $(make-exe)
endif endif
ifeq ($(TARGET), $(filter $(TARGET), x86.rtems x86.rtems_posix)) ifeq ($(TARGET), $(filter $(TARGET), x86.rtems x86.rtems_posix))
OBJS = $(USER_OBJS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(EXTERNAL_OBJECTS) OBJS = $(USER_OBJS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(EXTERNAL_OBJECTS)
$(BINARY): generate-asn1-deployment target-objects check-rtems compile-po-hi $(USER_OBJS) $(GENERATED_OBJS) $(BINARY): generate-asn1-deployment target-objects check-rtems compile-po-hi $(USER_OBJS) $(GENERATED_OBJS)
$(make-exe) $(make-exe)
cp $(BINARY) binary cp $(BINARY) binary
...@@ -271,47 +257,70 @@ endif #NEED_TRANSPORT ...@@ -271,47 +257,70 @@ endif #NEED_TRANSPORT
endif #TARGET=x86qemu endif #TARGET=x86qemu
ifeq ($(TARGET), nds.rtems) ifeq ($(TARGET), nds.rtems)
OBJS = $(USER_OBJS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(EXTERNAL_OBJECTS) OBJS = $(USER_OBJS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(EXTERNAL_OBJECTS)
$(BINARY): generate-asn1-deployment target-objects check-rtems compile-po-hi $(USER_OBJS) $(GENERATED_OBJS) $(BINARY): generate-asn1-deployment target-objects check-rtems compile-po-hi $(USER_OBJS) $(GENERATED_OBJS)
$(CC) -o $(BINARY) $(EXTERNAL_OBJECTS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(USER_OBJS) $(LDFLAGS) $(CC) -o $(BINARY) $(EXTERNAL_OBJECTS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(USER_OBJS) $(LDFLAGS)
endif endif
ifeq ($(TARGET), gumstix.rtems) ifeq ($(TARGET), gumstix.rtems)
OBJS = $(USER_OBJS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(EXTERNAL_OBJECTS) OBJS = $(USER_OBJS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(EXTERNAL_OBJECTS)
$(BINARY): generate-asn1-deployment target-objects check-rtems compile-po-hi $(USER_OBJS) $(GENERATED_OBJS) $(BINARY): generate-asn1-deployment target-objects check-rtems compile-po-hi $(USER_OBJS) $(GENERATED_OBJS)
$(make-exe) $(make-exe)
endif endif
ifeq ($(TARGET), compcert) ifeq ($(TARGET), compcert)
$(BINARY): generate-asn1-deployment target-objects compile-po-hi $(GENERATED_OBJS) $(TARGET_OBJECTS) $(BINARY):
for v in $(USER_OBJS); do mv ../../$$v . ; done @if [ ! -f ccomp ]; then \
mkdir -p drivers echo "Compcert not installed, exiting" ; \
for v in $(PO_HI_OBJS); do mv $(RUNTIME_PATH)/src/$$v $$v ; done else \
$(CC) -o $(BINARY) $(EXTERNAL_OBJECTS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(USER_OBJS) $(LDFLAGS) $(MAKE) generate-asn1-deployment compile-c-files compile-ada-files target-objects compile-po-hi $(GENERATED_OBJS) $(TARGET_OBJECTS); \
for v in $(USER_OBJS); do mv ../../$$v . ; done ; \
mkdir -p drivers; \
for v in $(PO_HI_OBJS); do mv $(RUNTIME_PATH)/src/$$v $$v ; done; \
$(CC) -o $(BINARY) $(EXTERNAL_OBJECTS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(USER_OBJS) $(LDFLAGS); \
fi
endif endif
ifeq ($(TARGET), $(filter $(TARGET), win32 native bench linux32 linux64 linux32-xenomai-posix linux32-xenomai-native)) ifeq ($(TARGET), $(filter $(TARGET), native bench linux32 linux64))
ifeq ($(TARGET), win32)
EXE=$(BINARY).exe
else
EXE=$(BINARY) EXE=$(BINARY)
$(BINARY):
$(MAKE) generate-asn1-deployment target-objects compile-c-files compile-ada-files compile-po-hi $(USER_OBJS) $(GENERATED_OBJS) $(TARGET_OBJECTS)
$(LD) -o $(EXE) $(EXTERNAL_OBJECTS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(USER_OBJS) $(LDFLAGS)
endif endif
$(BINARY): generate-asn1-deployment target-objects compile-po-hi $(USER_OBJS) $(GENERATED_OBJS) $(TARGET_OBJECTS)
$(CC) -o $(EXE) $(EXTERNAL_OBJECTS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(USER_OBJS) $(LDFLAGS) ifeq ($(TARGET), $(filter $(TARGET), win32))
EXE=$(BINARY).exe
$(BINARY):
@if [ ! -f i686-w64-mingw32-gcc: ]; then \
echo "Windows compiler is not installed in your system, exiting" ; \
else \
$(MAKE) generate-asn1-deployment target-objects compile-po-hi $(USER_OBJS) $(GENERATED_OBJS) $(TARGET_OBJECTS) ; \
$(LD) -o $(EXE) $(EXTERNAL_OBJECTS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(USER_OBJS) $(LDFLAGS) ; \
fi
endif
ifeq ($(TARGET), $(filter $(TARGET), linux32-xenomai-posix linux32-xenomai-native))
EXE=$(BINARY)
$(BINARY):
@if [ ! -f xeno-config ]; then \
echo "Xenomai is not installed in your system, exiting" ; \
else \
$(MAKE) generate-asn1-deployment target-objects compile-po-hi $(USER_OBJS) $(GENERATED_OBJS) $(TARGET_OBJECTS) ; \
$(LD) -o $(EXE) $(EXTERNAL_OBJECTS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(USER_OBJS) $(LDFLAGS) ; \
fi
endif endif
ifeq ($(TARGET), arm.dslinux) ifeq ($(TARGET), arm.dslinux)
$(BINARY): generate-asn1-deployment target-objects compile-po-hi $(USER_OBJS) $(GENERATED_OBJS) $(TARGET_OBJECTS) $(BINARY): generate-asn1-deployment target-objects compile-po-hi $(USER_OBJS) $(GENERATED_OBJS) $(TARGET_OBJECTS)
$(CC) -o $(BINARY) $(EXTERNAL_OBJECTS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(USER_OBJS) $(LDFLAGS) $(CC) -o $(BINARY) $(EXTERNAL_OBJECTS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(USER_OBJS) $(LDFLAGS)
endif endif
ifeq ($(TARGET), x86.linuxtaste) ifeq ($(TARGET), x86.linuxtaste)
$(BINARY): check-linuxtaste generate-asn1-deployment target-objects compile-po-hi $(USER_OBJS) $(GENERATED_OBJS) $(TARGET_OBJECTS) $(BINARY): check-linuxtaste generate-asn1-deployment target-objects compile-po-hi $(USER_OBJS) $(GENERATED_OBJS) $(TARGET_OBJECTS)
$(CC) -o $(BINARY) $(EXTERNAL_OBJECTS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(USER_OBJS) $(LDFLAGS) $(CC) -o $(BINARY) $(EXTERNAL_OBJECTS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(USER_OBJS) $(LDFLAGS)
endif endif
%.o: %.cpp %.o: %.cpp
$(CPP) $(INCLUDE) $(CPPFLAGS) -c -o $@ $< $(CPP) $(INCLUDE) $(CPPFLAGS) -c -o $@ $<
...@@ -319,15 +328,15 @@ endif ...@@ -319,15 +328,15 @@ endif
$(CC) $(INCLUDE) $(CFLAGS) -c -o $@ $< $(CC) $(INCLUDE) $(CFLAGS) -c -o $@ $<
clean: target-clean clean: target-clean
@-rm -f *~ *.o *.al temp.* *.metrix $(BINARY) $(BINARY).bin $(BINARY).bt $(BINARY).num $(BINARY).nxe @-rm -f *~ *.o *.al temp.* *.metrix $(BINARY) $(BINARY).bin $(BINARY).bt $(BINARY).num $(BINARY).nxe b~*.* *.ali
@-rm -rf drivers @-rm -rf drivers
if test ! "$(CLEANDIRS)" = ""; then \ if test ! "$(CLEANDIRS)" = ""; then \
rm -rf $(CLEANDIRS); \ rm -rf $(CLEANDIRS); \
fi fi
generate-doc: generate-doc:
if [ -d generated-documentation ]; then rm -rf generated-documentation ; fi @if [ -d generated-documentation ]; then rm -rf generated-documentation ; fi
( DOXYBIN=`which doxygen 2>/dev/null` && if [ -x "$$DOXYBIN" ]; then ` which doxygen` doxygen.cfg ; fi ) || exit 0 @( DOXYBIN=`which doxygen 2>/dev/null` && if [ -x "$$DOXYBIN" ]; then ` which doxygen` doxygen.cfg ; fi ) || exit 0
ifdef USE_GPROF ifdef USE_GPROF
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
## This file has been built for a generit RTEMS integration ## This file has been built for a generit RTEMS integration
include $(RTEMS_MAKEFILE_PATH)/Makefile.inc -include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
include $(RTEMS_CUSTOM) -include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg -include $(PROJECT_ROOT)/make/leaf.cfg
define bsp-post-link define bsp-post-link
...@@ -25,9 +25,9 @@ CPP = $(CXX_FOR_TARGET) ...@@ -25,9 +25,9 @@ CPP = $(CXX_FOR_TARGET)
LD = $(LD_FOR_TARGET) LD = $(LD_FOR_TARGET)
GPROF = sparc-rtems-gprof GPROF = sparc-rtems-gprof
TARGET_SOURCES = TARGET_SOURCES =
#TARGET_TRANSPORT_SOURCES = $(RUNTIME_PATH)/config/leon-rtems/config.c #TARGET_TRANSPORT_SOURCES = $(RUNTIME_PATH)/config/leon-rtems/config.c
TARGET_TRANSPORT_SOURCES = TARGET_TRANSPORT_SOURCES =
TARGET_CFLAGS = -DRTEMS_PURE -DLEON_RTEMS $(GCC_GENERIC_FLAGS) $(CPU_FLAGS) $(AM_FLAGS) $(GCCSPECS) TARGET_CFLAGS = -DRTEMS_PURE -DLEON_RTEMS $(GCC_GENERIC_FLAGS) $(CPU_FLAGS) $(AM_FLAGS) $(GCCSPECS)
TARGET_INCLUDE = -I $(RUNTIME_PATH)/config/leon-rtems/ TARGET_INCLUDE = -I $(RUNTIME_PATH)/config/leon-rtems/
...@@ -53,7 +53,7 @@ ifeq ($(RTEMS_API),4.10) ...@@ -53,7 +53,7 @@ ifeq ($(RTEMS_API),4.10)
TARGET_CFLAGS += -DRTEMS410 TARGET_CFLAGS += -DRTEMS410
endif endif
target-clean: target-clean:
ifdef USE_GPROF ifdef USE_GPROF
...@@ -71,5 +71,3 @@ LINK_LIBS+=-lm ...@@ -71,5 +71,3 @@ LINK_LIBS+=-lm
emulate-qemu: $(BINARY) emulate-qemu: $(BINARY)
qemu-system-sparc -M at697 -nographic -kernel $(BINARY).exe qemu-system-sparc -M at697 -nographic -kernel $(BINARY).exe
...@@ -2,7 +2,7 @@ TARGET_CFLAGS = @NATIVE_CFLAGS@ ...@@ -2,7 +2,7 @@ TARGET_CFLAGS = @NATIVE_CFLAGS@
TARGET_LDFLAGS = @NATIVE_LDFLAGS@ -L$(RUNTIME_PATH)/libs/linux32/ -L$(RUNTIME_PATH)/libs/linux64/ -llua -lm TARGET_LDFLAGS = @NATIVE_LDFLAGS@ -L$(RUNTIME_PATH)/libs/linux32/ -L$(RUNTIME_PATH)/libs/linux64/ -llua -lm
SIMULINK_LDFLAGS = @SIMULINK_LDFLAGS@ SIMULINK_LDFLAGS = @SIMULINK_LDFLAGS@
CC = gcc CC = gcc
LD = ld LD = gcc
GPROF = gprof GPROF = gprof
......
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