Files
harbour-core/harbour/config/linux/clang.mk
Viktor Szakats 0513bda029 2010-05-30 19:59 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/xhb/hbcompat.ch
  * contrib/xhb/xhbfs.c
    ! Deleted FILESIZE(). It's not an xhb compatibility function, 
      but one offered as part of CT lib in xhb, and HBCT in Harbour.

  * src/common/hbver.c
    + Added compiler version detection for clang 2.x (and newer)
      Patch by Tamas Tevesz.

  * INSTALL
    * Minor.

  * config/bsd/clang.mk
  * config/linux/clang.mk
    + Clearing forced C++ mode if clang 1.x is detected.
      (Patch from Tamas Tevesz. Slight fix added by me to
      set HB_CMP when falling back to C mode. I didn't make
      tests though.)
    ; NOTE: Probably HB_BUILD_MODE=c should be export-ed
            to avoid double evaluation. Pls test it.

  * config/postinst.prg
  * config/ren_sfn.prg
    + Raised warning level to 3.
2010-05-30 18:01:29 +00:00

66 lines
1.3 KiB
Makefile

#
# $Id$
#
ifeq ($(HB_BUILD_MODE),cpp)
ifneq ($(findstring clang$(subst x, ,x)version$(subst x, ,x)1,$(shell clang --version)),)
HB_BUILD_MODE := c
endif
endif
ifeq ($(HB_BUILD_MODE),cpp)
HB_CMP := clang++
else
HB_CMP := clang
endif
OBJ_EXT := .o
LIB_PREF := lib
LIB_EXT := .a
HB_DYN_COPT := -DHB_DYNLIB -fpic
CC := $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP)$(HB_CCPOSTFIX)
ifneq ($(filter --analyze, $(HB_USER_CFLAGS)),)
CC_IN :=
else
CC_IN := -c
endif
CC_OUT := -o
CFLAGS += -I. -I$(HB_INC_COMPILE)
ifneq ($(HB_BUILD_WARN),no)
CFLAGS += -W -Wall
else
CFLAGS += -W
endif
ifneq ($(HB_BUILD_OPTIM),no)
CFLAGS += -O3
endif
ifeq ($(HB_BUILD_DEBUG),yes)
CFLAGS += -g
endif
LD := $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP)$(HB_CCPOSTFIX)
LD_OUT := -o
LIBPATHS := $(foreach dir,$(LIB_DIR) $(SYSLIBPATHS),-L$(dir))
LDLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(SYSLIBS),-l$(lib))
LDFLAGS += $(LIBPATHS)
AR := $(HB_CCPREFIX)ar
AR_RULE = ( $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) rcs $(LIB_DIR)/$@ $(^F) $(ARSTRIP) ) || ( $(RM) $(LIB_DIR)/$@ && false )
DY := $(CC)
DFLAGS += -shared $(LIBPATHS)
DY_OUT := -o$(subst x,x, )
DLIBS := $(foreach lib,$(HB_USER_LIBS) $(SYSLIBS),-l$(lib))
DY_RULE = $(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE2)
include $(TOP)$(ROOT)config/rules.mk