Files
harbour-core/harbour/config/linux/sunpro.cf
Viktor Szakats cebe0c72ed 2009-08-12 14:47 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* config/rules.cf
    ! Changed CC_RULE and CPP_RULE to have CC_OUT option _before_ CC_IN.
      Quick check didn't reveal any problems with this accross our supported
      compiler, but I may be wrong, so pls check me, I didn't test this 
      change thoroughly.
      This change fixes CC_OUT for bcc, where it was ignored before.
      If this is breaks other compilers, bcc specific CC_RULE should be
      added to win/bcc.cf.

  * utils/hbmk2/hbmk2.prg
  * source/rtl/gtcrs/gtcrs.c
  * source/rtl/gtcrs/gtcrs.h
  * source/rtl/gtcrs/Makefile
  * source/rtl/gttrm/Makefile
  * source/rtl/gttrm/gttrm.c
  * source/rtl/gtsln/mousesln.c
  * source/rtl/gtsln/gtsln.c
  * source/rtl/gtsln/Makefile
    * HAVE_GPM_H -> HB_HAS_GPM

  * config/global.cf
    + Added some compile-time macros in comment.
    * Minor correction to MKFLAGS comment.

  * source/rtl/console.c
  * source/rtl/hbgtcore.c
    * Changed wording 'screen driver' to 'Harbour terminal (GT)'.
      Former term isn't used by us.

  * config/bsd/gcc.cf
  * config/darwin/gcc.cf
  * config/hpux/gcc.cf
  * config/dos/djgpp.cf
  * config/linux/gcc.cf
  * config/linux/icc.cf
  * config/linux/sunpro.cf
  * config/os2/gcc.cf
  * config/sunos/gcc.cf
  * config/sunos/sunpro.cf
    + Readded accidentally deleted feature to include *nix system
      libs needed for rtl, only if rtl is actually linked.
      (IOW in practice don't link them for harbour/hbpp executables)
    ! Fixed a few old problems where some extra libs were always
      linked. Now m is the only one linked in all scenarios.
    + Added linking pdcurses along with gtcrs for djgpp.
    * Standardized LDFLAGS in linux/icc (left from previous modification).
    ! Indentations corrected.
2009-08-12 12:49:09 +00:00

112 lines
2.6 KiB
CFEngine3

#
# $Id$
#
ifeq ($(HB_BUILD_MODE),cpp)
HB_CMP := sunCC
else
HB_CMP := suncc
endif
OBJ_EXT := .o
LIB_PREF := lib
LIB_EXT := .a
CC := $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP)
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, )
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
# workaround for problems in x86 PIC builds exploited by hbpcre library code
ifeq ($(LIBNAME),hbpcre)
CFLAGS += -xbuiltin=%none
endif
endif
# force position independent code for harbour shared library
# it's not optimal but without support for compilation in two passes
# we have to use this option also for static libraries and binaries
CFLAGS += -KPIC
# in HB_ISAOPT we may have platform dependent settings set in different
# sunpro*.cf files
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
LD := $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP)
LD_OUT := -o$(subst x,x, )
# Add all libraries specified in LIBS.
LIBPATHS := -L$(LIB_DIR)
LDLIBS := $(foreach lib,$(LIBS),-l$(lib))
ifneq ($(findstring hbrtl, $(LIBS)),)
# Add the specified GT driver library
ifneq ($(findstring gtcrs, $(LIBS)),)
ifeq ($(HB_CRS_LIB),)
HB_CRS_LIB := ncurses
endif
LDLIBS += -l$(HB_CRS_LIB)
endif
ifneq ($(findstring gtsln, $(LIBS)),)
LDLIBS += -lslang
endif
ifneq ($(findstring gtxwc, $(LIBS)),)
LDLIBS += -lX11
LIBPATHS += -L/usr/X11R6/lib
endif
# HB_GPM_MOUSE: use gpm mouse driver
ifeq ($(HB_GPM_MOUSE),yes)
LDLIBS += -lgpm
endif
ifneq ($(findstring -DHB_PCRE_REGEX, $(HB_USER_CFLAGS)),)
LDLIBS += -lpcre
endif
ifneq ($(findstring -DHB_EXT_ZLIB, $(HB_USER_CFLAGS)),)
LDLIBS += -lz
endif
LDLIBS += -lrt -ldl
endif
LDLIBS += -lm
LDFLAGS += $(LIBPATHS)
AR := $(HB_CCPREFIX)ar
ARFLAGS :=
AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) crs $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false )
include $(TOP)$(ROOT)config/rules.cf