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-x86 # # CONFIG.Common.linux-x86,v 1.16.2.9 2005/02/25 16:00:40 jba Exp # This file is maintained by the build community. # # Definitions for linux-x86 target builds # Sites may override these definitions in CONFIG_SITE.Common.linux-x86 #-------------------------------------------------------

# 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 = x86

ARCH_DEP_CPPFLAGS += -D_X86_

ifeq ($(BUILD_CLASS),CROSS) ifeq ($(EPICS_HOST_ARCH),linux-x86) # Added for 386,486,... cross builds CMPLR_PREFIX= CROSS_INCLUDES= CROSS_LDFLAGS= # Use -w not -Wall #WARN_CFLAGS_YES = -w #WARN_CXXFLAGS_YES = -w -include $(CONFIG)/os/CONFIG_SITE.Common.linux-x86 -include $(CONFIG)/os/CONFIG.linux-x86.linux-x86 -include $(CONFIG)/os/CONFIG_SITE.linux-x86.linux-x86 else GNU_TARGET=i586-pc-linux-gnu CMPLR_SUFFIX= CMPLR_PREFIX=$(addsuffix -,$(GNU_TARGET)) endif endif

%end%

-- PeterZumbruch - 22 Aug 2007

This topic: Epics > ConfigurationEpicsCrossCompileLinux686 > EpicsV3149CONFIGCommonLinux686 > EpicsV3149CONFIGCommonLinuxX86
Topic revision: 2007-08-22, PeterZumbruch
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)