Files
harbour-core/harbour/config/linux/gcc.cf
Viktor Szakats fecbf507cc 2009-07-15 21:35 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* config/rules.cf
  * config/darwin/gcc.cf
  * config/hpux/gcc.cf
  * config/dos/dir.cf
  * config/dos/global.cf
  * config/dos/install.cf
  * config/global.cf
  * config/win/global.cf
  * config/win/install.cf
  * config/win/dir.cf
  * config/bin.cf
  * config/linux/gcc.cf
  * config/linux/dir.cf
  * config/linux/icc.cf
  * config/linux/global.cf
  * config/linux/install.cf
  * config/os2/dir.cf
  * config/os2/global.cf
  * config/os2/install.cf
  * config/dir.cf
  * config/sunos/gcc.cf
  * config/bsd/gcc.cf
  * config/c.cf
  * config/wce/dir.cf
  * config/wce/global.cf
  * config/wce/install.cf
    * Formatting (whitespaces, indentation).

  * utils/hbtest/Makefile
    * Moved setting before including central make files.

  * config/global.cf
    + COMSPEC detection completed.
2009-07-15 19:40:15 +00:00

111 lines
2.1 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_CCPREFIX)$(HB_CMP)
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I. -I$(HB_INC_COMPILE)
ifeq ($(HB_COMPILER),icc)
CFLAGS = -D_GNU_SOURCE
#CFLAGS += -std=c99
#CFLAGS += -xHOST
else
CFLAGS =
endif
ifneq ($(HB_BUILD_WARN),no)
ifeq ($(HB_COMPILER),icc)
#CFLAGS += -w2 -Wall
else
CFLAGS += -Wall -W
endif
endif
ifneq ($(HB_BUILD_OPTIM),no)
CFLAGS += -O3
endif
# uncomment this if you want to force relocateable code for .so libs
# it's necessary on some platforms but can reduce performance
#CFLAGS += -fPIC
ifeq ($(HB_BUILD_DEBUG),yes)
CFLAGS += -g
endif
LD = $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP)
LD_OUT = -o
# Add all libraries specified in LIBS.
LINKPATHS += -L$(LIB_DIR)
# our libs have a lot of cross referenced now and we have to group them
# untill we don't clean them
LINKLIBS += -Wl,--start-group
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 and other RTLs
ifeq ($(findstring hbrtl,$(LIBS)),hbrtl)
LINKLIBS += $(foreach gt, $(HB_GT_LIBS), -l$(gt))
# screen driver libraries
ifeq ($(HB_CRS_LIB),)
HB_CRS_LIB = ncurses
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
# HB_GPM_MOUSE: use gpm mouse driver
ifeq ($(HB_GPM_MOUSE),yes)
LINKLIBS += -lgpm
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 -ldl -Wl,--end-group
LDFLAGS = $(LINKPATHS)
AR = $(HB_CCPREFIX)ar
ARFLAGS = $(HB_USER_AFLAGS)
AR_RULE = $(AR) $(ARFLAGS) crs $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false )
include $(TOP)$(ROOT)config/rules.cf