Files
harbour-core/harbour/config/linux/sunpro.mk
Viktor Szakats a3999d669a 2009-09-21 12:11 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* config/beos/gcc.mk
  * config/beos/global.mk
  * config/bsd/gcc.mk
  * config/bsd/global.mk
  * config/wce/mingwarm.mk
  * config/hpux/gcc.mk
  * config/hpux/global.mk
  * config/dos/djgpp.mk
  * config/win/mingw.mk
  * config/win/cygwin.mk
  * config/linux/icc.mk
  * config/linux/sunpro.mk
  * config/os2/gcc.mk
  * config/sunos/gcc.mk
  * config/sunos/global.mk
  * config/sunos/sunpro.mk
    + Added HB_BUILD_STRIP support for rest of compilers.
    ; Please make tests.

  * bin/postinst.sh
    - Deleted strip from postinst phase.
2009-09-21 10:13:39 +00:00

88 lines
2.0 KiB
Makefile

#
# $Id$
#
ifeq ($(HB_BUILD_MODE),cpp)
HB_CMP := sunCC
else
HB_CMP := suncc
endif
OBJ_EXT := .o
LIB_PREF := lib
LIB_EXT := .a
HB_DYN_COPT := -DHB_DYNLIB -KPIC
CC := $(HB_CCACHE) $(HB_CCPATH)$(HB_CCPREFIX)$(HB_CMP)$(HB_CCPOSTFIX)
CC_IN := -c
# NOTE: The ending space after -o is important, please preserve it.
# Now solved with '$(subst x,x, )' expression.
CC_OUT := -o$(subst x,x, )
CXX := $(HB_CCACHE) $(HB_CCPATH)$(HB_CCPREFIX)sunCC$(HB_CCPOSTFIX)
CPPFLAGS := -I. -I$(HB_INC_COMPILE)
CFLAGS :=
LDFLAGS :=
# try to keep `-fast' as left as possible, as later optim
# flags may override values set by `-fast', and this way
# no warnings are generated.
ifneq ($(HB_BUILD_OPTIM),no)
# Together with $(HB_ISAOPT) above, these are supposed to (somewhat)
# conform to the Blastwave build standards, see
# http://wiki.blastwave.org/mediawiki/index.php/Build_Standards
# Try to keep them this way.
CFLAGS += -fast
CFLAGS += -xnolibmopt
endif
export HB_ISAOPT
CFLAGS += $(HB_ISAOPT)
LDFLAGS += $(HB_ISAOPT)
ifneq ($(HB_BUILD_WARN),no)
CFLAGS += -erroff=%none
else
CFLAGS += -erroff=%all
endif
ifeq ($(HB_BUILD_DEBUG),yes)
CFLAGS += -g
endif
ifneq ($(filter $(HB_BUILD_STRIP),all lib),)
ARSTRIP = && strip -S $(LIB_DIR)/$@
endif
ifneq ($(filter $(HB_BUILD_STRIP),all bin),)
LDSTRIP := -s
DYSTRIP := -s
endif
LD := $(HB_CCACHE) $(HB_CCPATH)$(HB_CCPREFIX)$(HB_CMP)$(HB_CCPOSTFIX)
LD_OUT := -o$(subst x,x, )
LIBPATHS := $(foreach dir,$(LIB_DIR) $(SYSLIBPATHS),-L$(dir))
LDLIBS := $(foreach lib,$(LIBS) $(SYSLIBS),-l$(lib))
LDFLAGS += $(LIBPATHS)
AR := ar
ARFLAGS :=
AR_RULE = ( $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) rcs $(LIB_DIR)/$@ $(^F) $(ARSTRIP) ) || ( $(RM) $(LIB_DIR)/$@ && false )
DY := $(CC)
DFLAGS := -G $(HB_ISAOPT) $(LIBPATHS)
ifneq ($(HB_BUILD_OPTIM),no)
DFLAGS += -fast -xnolibmopt
endif
DY_OUT := -o$(subst x,x, )
DLIBS := $(foreach lib,$(SYSLIBS),-l$(lib))
DY_RULE = $(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP)
include $(TOP)$(ROOT)config/rules.mk