Files
harbour-core/harbour/config/sunos/gcc.cf
Viktor Szakats 945c26d396 2009-07-17 09:01 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* make_gnu.sh
    ! Changed to use gmake on all sunos systems.

  * utils/hbmk2/hbmk2.prg
  * config/sunos/gcc.cf
    ! Added space after -o CC option. Required by some sunos systems.

  ; Thanks for valuable input and testing to Tamas Tevesz.
2009-07-17 07:05:54 +00:00

94 lines
1.7 KiB
CFEngine3

#
# $Id$
#
ifeq ($(HB_BUILD_MODE),cpp)
HB_CMP = g++
else
HB_CMP = gcc
endif
OBJ_EXT = .o
EXE_EXT =
LIB_PREF = lib
LIB_EXT = .a
CC = $(HB_CCACHE) $(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 =
ifneq ($(HB_BUILD_WARN),no)
CFLAGS += -Wall -W
endif
ifneq ($(HB_BUILD_OPTIM),no)
CFLAGS += -O3
endif
CFLAGS += -fPIC
ifeq ($(HB_BUILD_DEBUG),yes)
CFLAGS += -g
endif
LD = $(HB_CCACHE) $(HB_CMP)
LD_OUT = -o
# Add all libraries specified in LIBS.
LINKPATHS += -L$(LIB_DIR)
LINKLIBS += $(foreach lib, $(LIBS), -l$(lib))
# If LIBS specifies the RDD library, add all DB drivers.
ifeq ($(findstring hbrdd,$(LIBS)),hbrdd)
LINKLIBS += $(foreach drv, $(HB_DB_DRIVERS), -l$(drv))
endif
# Add the specified GT driver library
ifeq ($(findstring hbrtl,$(LIBS)),hbrtl)
LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt)) -lhbrtl
# screen driver libraries
ifeq ($(HB_CRS_LIB),)
HB_CRS_LIB = curses
endif
ifneq ($(findstring gtcrs, $(HB_GT_LIBS)),)
LINKLIBS += -l$(HB_CRS_LIB)
endif
ifneq ($(findstring gtsln, $(HB_GT_LIBS)),)
LINKLIBS += -lslang
endif
ifneq ($(findstring gtxwc, $(HB_GT_LIBS)),)
LINKLIBS += -lX11
#LINKPATHS += -L/usr/X11R6/lib64
LINKPATHS += -L/usr/X11R6/lib
endif
endif
ifneq ($(findstring -DHB_PCRE_REGEX, $(HB_USER_CFLAGS)),)
LINKLIBS += -lpcre
endif
ifneq ($(findstring -DHB_EXT_ZLIB, $(HB_USER_CFLAGS)),)
LINKLIBS += -lz
endif
LINKLIBS += -lm -lrt
LINKLIBS += -lsocket -lnsl -lresolv
LDFLAGS += $(LINKPATHS)
AR = ar
ARFLAGS = $(HB_USER_AFLAGS)
AR_RULE = $(AR) $(ARFLAGS) cr $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false )
include $(TOP)$(ROOT)config/rules.cf