Epics@GSI Webhome

<ol> <div style="overflow:auto;padding:0.5ex;border:2px solid #808080; margin:0.5ex;padding-left:1ex;padding-right:1ex; margin-top:0px"> %begin makefile% # CONFIG.Common.linux-cris # # Definitions for linux-cris target builds # Sites may override these definitions in CONFIG_SITE.Common.linux-cris #-------------------------------------------------------

# Include definitions common to all linux targets include $(CONFIG)/os/CONFIG.Common.linuxCommon %end%

<ol> <div style="text-align:right; margin-right:3ex ;margin-bottom:0;"> <span style="padding:1px; border:2px solid #808080;"> CONFIG.Common.linuxCommon</span></div> <div style="overflow:auto;padding:0.5ex;border:2px solid #808080; margin:0.5ex;padding-left:1ex;padding-right:1ex; margin-top:0px"> %begin makefile% # CONFIG.Common.linuxCommon # # CONFIG.Common.linuxCommon,v 1.1.2.3 2006/12/04 21:15:09 jba Exp # This file is maintained by the build community. # # Definitions for linux target builds # Sites may override these definitions in CONFIG_SITE.Common.linuxCommon #-------------------------------------------------------

# Include definitions common to all Unix targets include $(CONFIG)/os/CONFIG.Common.UnixCommon %end%

<ol> <div style="text-align:right; margin-right:3ex ;margin-bottom:0;"> <span style="padding:1px; border:2px solid #808080;"> CONFIG.Common.UnixCommon</span></div> <div style="overflow:auto;padding:0.5ex;border:2px solid #808080; margin:0.5ex;padding-left:1ex;padding-right:1ex; margin-top:0px"> %begin makefile% # UnixCommon # # UnixCommon,v 1.18.2.10 2006/12/11 18:12:42 jba Exp # # Contains definitions common to all Unix target archs # # This file is maintained by the build community. # Sites may override definitions in UnixCommon # or CONFIG_SITE..UnixCommon #-------------------------------------------------------

# Unix valid build types VALID_BUILDS = Host Ioc

#------------------------------------------------------- # Gnu directory GNU_DIR = /usr/local

#------------------------------------------------------- # Unix prefix and suffix definitions EXE = OBJ = .o #Library prefix and suffixes LIB_PREFIX = lib LIB_SUFFIX = .a SHRLIB_SUFFIX = .so$(addprefix .,$(SHRLIB_VERSION)) LOADABLE_SHRLIB_SUFFIX = .so$(addprefix .,$(LOADABLE_SHRLIB_VERSION)) LOADABLE_SHRLIB_PREFIX = lib

#------------------------------------------------------- # names of libraries to build # -> lib.a LIBNAME = $(BUILD_LIBRARY:%=$(LIB_PREFIX)%$(LIB_SUFFIX)) # -> lib.so. SHRLIBNAME_YES = $(BUILD_LIBRARY:%=$(LIB_PREFIX)%$(SHRLIB_SUFFIX)) LOADABLE_SHRLIBNAME = $(LOADABLE_BUILD_LIBRARY:%=$(LOADABLE_SHRLIB_PREFIX)%$(LOADABLE_SHRLIB_SUFFIX))

#------------------------------------------------------- # shrlib: DEPLIBS, LDFLAGS, and LDLIBS definitions

# SHRLIB_LIBS deprecated LIB_LIBS += $(SHRLIB_LIBS)

SHRLIB_DEPLIBS=$(foreach lib, $(LIB_LIBS) $(USR_LIBS), $(firstword $(wildcard $(addsuffix /$(LIB_PREFIX)$(lib).*, $($(lib)_DIR) $(SHRLIB_SEARCH_DIRS))) $(addsuffix /$(LIB_PREFIX)$(lib)$(LIB_SUFFIX), $(firstword $($(lib)_DIR) $(INSTALL_LIB)))))

SHRLIB_LDLIBS = $(addprefix -l, $($*_LDLIBS) $(LIB_LIBS) $(USR_LIBS) $($*_SYS_LIBS) $(LIB_SYS_LIBS) $(USR_SYS_LIBS)) $(LDLIBS)

SHRLIB_DEPLIB_DIRS = $(foreach word,$(sort $(dir $($*_DEPLIBS) $(SHRLIB_DEPLIBS))), $(shell $(PERL) $(TOOLS)/fullPathName.pl $(word)))

SHRLIBDIR_LDFLAGS += $(SHRLIB_DEPLIB_DIRS:%=-L%)

#------------------------------------------------------- # Prod: DEPLIBS, LDFLAGS, and LDLIBS definitions

PROD_DEPLIBS=$(foreach lib,$(PROD_LIBS) $(USR_LIBS), $(firstword $(wildcard $(addsuffix /$(LIB_PREFIX)$(lib).*, $($(lib)_DIR) $(SHRLIB_SEARCH_DIRS))) $(addsuffix /$(LIB_PREFIX)$(lib)$(LIB_SUFFIX), $(firstword $($(lib)_DIR) $(INSTALL_LIB)))))

PROD_LDLIBS = $(addprefix -l, $($*_LDLIBS) $(PROD_LIBS) $(USR_LIBS) $($*_SYS_LIBS) $(PROD_SYS_LIBS) $(USR_SYS_LIBS))

LDLIBS_STATIC_YES = LDLIBS LDLIBS_SHARED_NO = LDLIBS PROD_LDLIBS += $($(firstword $(LDLIBS_STATIC_$(STATIC_BUILD)) $(LDLIBS_SHARED_$(SHARED_LIBRARIES))))

PROD_DEPLIB_DIRS = $(foreach word,$(sort $(dir $($*_DEPLIBS) $(PROD_DEPLIBS))), $(shell $(PERL) $(TOOLS)/fullPathName.pl $(word)))

PRODDIR_LDFLAGS += $(PROD_DEPLIB_DIRS:%=-L%)

#-------------------------------------------------- # Link definitions LINK.cpp = $(CCC) -o $@ $(STATIC_LDFLAGS) $(PRODDIR_LDFLAGS) $(LDFLAGS) LINK.cpp += $(PROD_LDFLAGS) $(PROD_LD_OBJS) $(PROD_LD_RESS) $(PROD_LDLIBS) LINK.shrlib = $(CCC) -o $@ $(SHRLIB_LDFLAGS) $(SHRLIBDIR_LDFLAGS) $(LDFLAGS) LINK.shrlib += $(LIB_LDFLAGS) $(LIBRARY_LD_OBJS) $(LIBRARY_LD_RESS) $(SHRLIB_LDLIBS) LINK.loadable_shrlib = $(CCC) -o $@ $(LOADABLE_SHRLIB_LDFLAGS) $(SHRLIBDIR_LDFLAGS) $(LDFLAGS) LINK.loadable_shrlib += $(LIB_LDFLAGS) $(LIBRARY_LD_OBJS) $(LIBRARY_LD_RESS) $(SHRLIB_LDLIBS)

#-------------------------------------------------- # Operating system definitions OP_SYS_CPPFLAGS += -DUNIX OP_SYS_LDLIBS += -lm

#-------------------------------------------------- # Allow site overrides -include $(CONFIG)/os/CONFIG_SITE.Common.UnixCommon -include $(CONFIG)/os/CONFIG_SITE.$(EPICS_HOST_ARCH).UnixCommon

%end%

%begin makefile%

OS_CLASS = Personalpages.Linux

CODE_CPPFLAGS = -D_REENTRANT

POSIX_CPPFLAGS = -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500 POSIX_LDLIBS = -lpthread

# -D_BSD_SOURCE for gethostname() in unistd.h as needed by cacChannelIO.cpp. OP_SYS_CPPFLAGS += -D_BSD_SOURCE OP_SYS_CPPFLAGS += -Dlinux OP_SYS_LDLIBS += -lrt

# Set runtime path for shared libraries SHRLIBDIR_LDFLAGS += $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%)

# Set runtime path for products PRODDIR_LDFLAGS += $(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%)

# Definitions used when COMMANDLINE_LIBRARY is READLINE LDLIBS_READLINE = -lreadline -lcurses

%end%

%begin makefile%

ARCH_CLASS = cris

ifeq ($(BUILD_CLASS),CROSS) GNU_TARGET = cris-axis-linux-gnu

# prefix of compiler tools CMPLR_SUFFIX = CMPLR_PREFIX = $(addsuffix -,$(GNU_TARGET))

# CROSS_INCLUDES AXIS_SDK_DIR=/misc/zumbruch/playground/ETRAX/SDK/devboard-R2_10 AXIS_SDK_TARGET_INCLUDE_DIR = $(AXIS_SDK_DIR)/target/$(GNU_TARGET)/include AXIS_SDK_TARGET_INCLUDE_DIR += $(AXIS_SDK_DIR)/target/$(GNU_TARGET)/usr/include

CROSS_INCLUDES = $(addprefix -isystem ,$(AXIS_SDK_TARGET_INCLUDE_DIR))

# CROSS_LDFLAGS AXIS_SDK_TARGET_LIB_DIR = $(AXIS_SDK_DIR)/target/$(GNU_TARGET)/lib AXIS_SDK_TARGET_LIB_DIR += $(AXIS_SDK_DIR)/target/$(GNU_TARGET)/usr/lib

CROSS_LDFLAGS = $(addprefix -L,$(AXIS_SDK_TARGET_LIB_DIR))

-include $(CONFIG)/os/CONFIG_SITE.Common.linux-cris %end%

<ol> <div style="text-align:right; margin-right:3ex ;margin-bottom:0;"> <span style="padding:1px; border:2px solid #808080;"> CONFIG_SITE.Common.linux-cris</span></div> <div style="overflow:auto;padding:0.5ex;border:2px solid #808080; margin:0.5ex;padding-left:1ex;padding-right:1ex; margin-top:0px"> %begin makefile% # CONFIG_SITE.Common.linux-cris # # Site Specific definitions for linux-cris target # Only the local epics system manager should modify this file

# NOTE for SHARED_LIBRARIES: In most cases if this is set to YES the # shared libraries will be found automatically. However if the .so # files are installed at a different path to their compile-time path # then in order to be found at runtime do one of these: # a) LD_LIBRARY_PATH must include the full absolute pathname to # $(INSTALL_LOCATION)/lib/$(EPICS_HOST_ARCH) when invoking base # executables. # b) Add the runtime path to SHRLIB_DEPLIB_DIRS and PROD_DEPLIB_DIRS, which # will add the named directory to the list contained in the executables. # c) Add the runtime path to /etc/ld.so.conf and run ldconfig # to inform the system of the shared library location.

# If readline is not installed comment the following line # to omit command-line editing and history support

#COMMANDLINE_LIBRARY = READLINE COMMANDLINE_LIBRARY = EPICS OP_SYS_CFLAGS += -g

%end%

%begin makefile% ifeq ($(EPICS_HOST_ARCH), linux-x86) -include $(CONFIG)/os/CONFIG.linux-x86.linux-cris %end%

<ol> <div style="text-align:right; margin-right:3ex ;margin-bottom:0;"> <span style="padding:1px; border:2px solid #808080;"> CONFIG.linux-x86.linux-cris</span></div> <div style="overflow:auto;padding:0.5ex;border:2px solid #808080; margin:0.5ex;padding-left:1ex;padding-right:1ex; margin-top:0px"> %begin makefile% # CONFIG.linux-x86.linux-cris # # Definitions for linux-x86 host - linux-cris target builds # Sites may override these definitions in CONFIG_SITE.linux-x86.linux-cris #-------------------------------------------------------

# Include common gnu compiler definitions include $(CONFIG)/CONFIG.gnuCommon %end%

<ol> <div style="text-align:right; margin-right:3ex ;margin-bottom:0;"> <span style="padding:1px; border:2px solid #808080;"> CONFIG.gnuCommon</span></div> <div style="overflow:auto;padding:0.5ex;border:2px solid #808080; margin:0.5ex;padding-left:1ex;padding-right:1ex; margin-top:0px"> %begin makefile% #************************************************************************* # Copyright (c) 2002 The University of Chicago, as Operator of Argonne # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. # EPICS BASE Versions 3.13.7 # and higher are distributed subject to a Software License Agreement found # in file LICENSE that is included with this distribution. #************************************************************************* #-------------------------------------------------- # GNU compiler defaults

GNU = YES

GNU_BIN = $(GNU_DIR)/bin GNU_LIB = $(GNU_DIR)/lib

CC = $(GNU_BIN)/$(CMPLR_PREFIX)gcc$(CMPLR_SUFFIX) CCC = $(GNU_BIN)/$(CMPLR_PREFIX)g++$(CMPLR_SUFFIX) AR = $(GNU_BIN)/$(CMPLR_PREFIX)ar$(CMPLR_SUFFIX) -rc LD = $(GNU_BIN)/$(CMPLR_PREFIX)ld$(CMPLR_SUFFIX) -r CPP = $(CC) -x c -E RANLIB = $(GNU_BIN)/$(CMPLR_PREFIX)ranlib$(CMPLR_SUFFIX)

CONFORM_CFLAGS_ANSI = -ansi CONFORM_CFLAGS_STRICT = -ansi CONFORM_CFLAGS_TRAD = -traditional PROF_CFLAGS_YES = -p GPROF_CFLAGS_YES = -pg CODE_CFLAGS = $(PROF_CFLAGS_$(PROFILE)) $(GPROF_CFLAGS_$(GPROF)) WARN_CFLAGS_YES = -Wall WARN_CFLAGS_NO = -w OPT_CFLAGS_YES = -O3 OPT_CFLAGS_NO = -g

CONFORM_CXXFLAGS_NORMAL = -ansi CONFORM_CXXFLAGS_STRICT = -ansi PROF_CXXFLAGS_YES = -p GPROF_CXXFLAGS_YES = -pg CODE_CXXFLAGS = $(PROF_CXXFLAGS_$(PROFILE)) $(GPROF_CXXFLAGS_$(GPROF)) WARN_CXXFLAGS_YES = -Wall WARN_CXXFLAGS_NO = -w OPT_CXXFLAGS_YES = -O3 OPT_CXXFLAGS_NO = -g

CODE_LDFLAGS = $(PROF_CXXFLAGS_$(PROFILE)) $(GPROF_CXXFLAGS_$(GPROF))

STATIC_LDFLAGS_YES = -static STATIC_LDFLAGS_NO =

SHRLIB_CFLAGS = -fPIC

GNU_LDLIBS_YES = -lgcc

%end%

%begin makefile% GNU_DIR = /misc/zumbruch/playground/ETRAX/compiler/cris-tools #maybe replace by AXIS_DIR/build/tools ?

# Copied from x86.x86 STATIC_LDFLAGS_YES= -Wl,-Bstatic STATIC_LDFLAGS_NO= STATIC_LDLIBS_YES= -Wl,-Bdynamic STATIC_LDLIBS_NO=

SHRLIB_LDFLAGS += -shared -fPIC LOADABLE_SHRLIB_LDFLAGS = -shared -fPIC

#OPT_CXXFLAGS_YES = OPT_CXXFLAGS_YES = -Os

%end%

%begin makefile% -include $(CONFIG)/os/CONFIG_SITE.linux-x86.linux-cris %end%

<ol> <div style="text-align:right; margin-right:3ex ;margin-bottom:0;"> <span style="padding:1px; border:2px solid #808080;"> CONFIG_SITE.linux-x86.linux-cris</span></div> <div style="overflow:auto;padding:0.5ex;border:2px solid #808080; margin:0.5ex;padding-left:1ex;padding-right:1ex; margin-top:0px"> %begin makefile% # CONFIG_SITE.linux-x86.linux-cris # # Site specific definitions for linux-x86 host - linux-cris target builds #-------------------------------------------------------

%end%

%begin makefile% endif endif

SHARED_LIBRARIES=NO STATIC_BUILD=YES

ARCH_DEP_CFLAGS += -mno-mul-bug-workaround OP_SYS_CFLAGS += -mlinux ARCH_DEP_CPPFLAGS += -D_cris_ -mlinux

%end%

-- PeterZumbruch - 22 Aug 2007
Topic revision: r3 - 2007-08-22, PeterZumbruch - This page was cached on 2024-12-20 - 02:31.

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback | Legal notice | Privacy Policy (german)