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% # 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%

-- PeterZumbruch - 22 Aug 2007
Topic revision: r3 - 2007-08-22, PeterZumbruch - This page was cached on 2021-10-18 - 23:34.

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 | Imprint (german) | Privacy Policy (german)