prefix to path names. This is a cleaner solution since it requires no changes to any other EPICS code and works for all places that files are opened.
111 lines
3.4 KiB
Plaintext
111 lines
3.4 KiB
Plaintext
#
|
|
# This file contains definitions for RTEMS builds
|
|
#
|
|
# $Id$
|
|
# Author: W. Eric Norum
|
|
# Canadian Light Source
|
|
# eric@cls.usask.ca
|
|
#
|
|
|
|
#
|
|
# RTEMS tools are similar to UNIX tools
|
|
#
|
|
-include $(CONFIG)/os/CONFIG.Common.UnixCommon
|
|
|
|
###############################################################################
|
|
# #
|
|
# RTEMS-specific overrides of common UNIX definitions #
|
|
# #
|
|
###############################################################################
|
|
|
|
#
|
|
# Build types
|
|
#
|
|
VALID_BUILDS = Ioc
|
|
|
|
#
|
|
# Pick up the RTEMS tool/path definitions from the RTEMS BSP directory.
|
|
#
|
|
ifneq "$(T_A)" ""
|
|
RTEMS_MAKEFILE_PATH := $(dir $(RTEMS_MAKEFILE_PATH))/$(subst RTEMS-,,$(T_A))
|
|
-include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
|
|
-include $(RTEMS_CUSTOM)
|
|
-include $(CONFIG.CC)
|
|
endif
|
|
|
|
#
|
|
# Override RTEMS optimization flags
|
|
#
|
|
CFLAGS_OPTIMIZE =
|
|
|
|
#
|
|
# The RTEMS Makefiles redefine several macros, so we have to go
|
|
# through the following contortions to get the EPICS flags back.
|
|
#
|
|
CFLAGS += $(CONFORM_CFLAGS) $(OPT_CFLAGS) $(DEBUG_CFLAGS) $(WARN_CFLAGS)\
|
|
$(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(CODE_CFLAGS)\
|
|
$(STATIC_CFLAGS) $(OP_SYS_CFLAGS)
|
|
|
|
CXXFLAGS +=$(CONFORM_CXXFLAGS) $(OPT_CXXFLAGS) $(DEBUG_CXXFLAGS) $(WARN_CXXFLAGS)\
|
|
$(TARGET_CXXFLAGS) $(USR_CXXFLAGS) $(ARCH_DEP_CXXFLAGS) $(CODE_CXXFLAGS)\
|
|
$(STATIC_CXXCFLAGS) $(OP_SYS_CFLAGS) $(TEMPL_INST_CXXFLAG)
|
|
|
|
LDFLAGS += $(OPT_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(DEPLIB_LDFLAGS)\
|
|
$(ARCH_DEP_LDFLAGS) $(STATIC_LDFLAGS) $(OP_SYS_LDFLAGS)
|
|
|
|
CPPFLAGS += $(CONFORM_CFLAGS) $(POSIX_CPPFLAGS) $(EPICS_BASE_CPPFLAGS)\
|
|
$(TARGET_CPPFLAGS) $(USR_CPPFLAGS) $(ARCH_DEP_CPPFLAGS) $(OP_SYS_CPPFLAGS)
|
|
|
|
#--------------------------------------------------
|
|
# operating system class (include/os/<os_class>)
|
|
OS_CLASS = RTEMS
|
|
|
|
#--------------------------------------------------
|
|
# Operating system flags
|
|
OP_SYS_CPPFLAGS = -Dfopen=rtems_fopen -Dmain=rtems_main -DIOCSH_USE_READLINE
|
|
OP_SYS_LDLIBS = -lreadline -lcurses
|
|
OP_SYS_LDFLAGS = $(CPU_CFLAGS) -u Init -lCom \
|
|
$(PROJECT_RELEASE)/lib/no-dpmem.rel \
|
|
$(PROJECT_RELEASE)/lib/no-mp.rel \
|
|
$(PROJECT_RELEASE)/lib/no-part.rel \
|
|
$(PROJECT_RELEASE)/lib/no-signal.rel \
|
|
$(PROJECT_RELEASE)/lib/no-rtmon.rel
|
|
CPPSNCFLAGS += -x c
|
|
|
|
#--------------------------------------------------
|
|
# c++ exceptions, YES or NO
|
|
CXX_EXCEPTIONS = NO
|
|
|
|
#--------------------------------------------------
|
|
# osithead use default stack, YES or NO
|
|
OSITHREAD_USE_DEFAULT_STACK = NO
|
|
|
|
#--------------------------------------------------
|
|
# RTEMS has neither shared libraries nor dynamic loading
|
|
STATIC_BUILD=YES
|
|
SHARED_LIBRARIES=NO
|
|
GCC_CODE_CFLAGS =
|
|
G++_CODE_CFLAGS =
|
|
|
|
#--------------------------------------------------
|
|
# RTEMS wants nothing to do with POSIX
|
|
GCC_POSIX_CPPFLAGS =
|
|
G++_POSIX_CPPFLAGS =
|
|
|
|
#--------------------------------------------------
|
|
# RTEMS is not that strict
|
|
GCC_CONFORM_CFLAGS_STRICT =
|
|
G++_CONFORM_CFLAGS_STRICT =
|
|
|
|
#--------------------------------------------------
|
|
# RTEMS uses C++ constructors to register commands/programs (snc +i option)
|
|
%.o: ../%.st
|
|
@echo "preprocessing $*.st"
|
|
@$(RM) $*.i
|
|
$(CPP) $(CPPSNCFLAGS) $< > $*.i
|
|
@echo "converting $*.i"
|
|
@$(RM) $*.c
|
|
$(SNC) +i $(TARGET_SNCFLAGS) $(SNCFLAGS) $*.i
|
|
@$(RM) $@
|
|
$(COMPILE.cpp) -x c++ -Wno-deprecated $*.c
|