On Tue, 25 May 2010, Tamas TEVESZ wrote:

hi,
 > let me make a small amendment: 

and one more. apparently clang (pkgsrc wip/clang at least) works too. 
config/bsd/clang.mk is a straight copy of config/linux/clang.mk so 
i'll spare inlining it. some hbmk2-voodoo is needed in addition to 
this, of course (will i ever be able to figure that one out).

ideally these should be tested on other bsds, but how about calling it 
work-in-progress and wait for people to give it a try? :>


-- 
[-]

mkdir /nonexistent
Index: config/bsd/clang.mk
===================================================================
--- config/bsd/clang.mk	(revision 0)
+++ config/bsd/clang.mk	(revision 0)
@@ -0,0 +1,60 @@
+#
+# $Id: clang.mk 14374 2010-04-22 23:53:45Z vszakats $
+#
+
+ifeq ($(HB_BUILD_MODE),cpp)
+   # -ccc-clang-cxx
+   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
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to