From 047cbef86590d7c48c6405badc1d6d68669db802 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 21 Sep 2009 09:18:24 +0000 Subject: [PATCH] 2009-09-21 11:16 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbqt/Makefile * contrib/hbqt/hbqts/Makefile * contrib/gtqtc/Makefile * contrib/gtqtc/gtqtcs/Makefile ! Fixed QT detection on darwin after 2009-09-18 12:19 change in detfun.mk. * utils/hbmk2/hbmk2.prg + Comment added (from .mk). * config/darwin/gcc.mk * config/darwin/icc.mk * config/darwin/clang.mk * config/darwin/global.mk * config/rules.mk + Implemented HB_BUILD_STRIP for darwin. (on darwin strip has to be called directly) --- harbour/ChangeLog | 19 +++++++++++++++++++ harbour/config/darwin/clang.mk | 4 ++-- harbour/config/darwin/gcc.mk | 4 ++-- harbour/config/darwin/global.mk | 8 ++++++++ harbour/config/darwin/icc.mk | 4 ++-- harbour/config/rules.mk | 2 +- harbour/contrib/gtqtc/Makefile | 3 +++ harbour/contrib/gtqtc/gtqtcs/Makefile | 3 +++ harbour/contrib/hbqt/Makefile | 3 +++ harbour/contrib/hbqt/hbqts/Makefile | 3 +++ harbour/utils/hbmk2/hbmk2.prg | 2 ++ 11 files changed, 48 insertions(+), 7 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 77d50cb5e2..156ada3143 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,25 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-09-21 11:16 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbqt/Makefile + * contrib/hbqt/hbqts/Makefile + * contrib/gtqtc/Makefile + * contrib/gtqtc/gtqtcs/Makefile + ! Fixed QT detection on darwin after 2009-09-18 12:19 change + in detfun.mk. + + * utils/hbmk2/hbmk2.prg + + Comment added (from .mk). + + * config/darwin/gcc.mk + * config/darwin/icc.mk + * config/darwin/clang.mk + * config/darwin/global.mk + * config/rules.mk + + Implemented HB_BUILD_STRIP for darwin. + (on darwin strip has to be called directly) + 2009-09-20 23:00 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * ChangeLog ! Added missing lines from prev entry: diff --git a/harbour/config/darwin/clang.mk b/harbour/config/darwin/clang.mk index 91bd6cfe00..6c8f398f2e 100644 --- a/harbour/config/darwin/clang.mk +++ b/harbour/config/darwin/clang.mk @@ -55,13 +55,13 @@ LDFLAGS += $(LIBPATHS) AR := libtool ARFLAGS := -AR_RULE = $(AR) -static $(ARFLAGS) $(HB_USER_AFLAGS) -o $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false ) +AR_RULE = ( $(AR) -static $(ARFLAGS) $(HB_USER_AFLAGS) -o $(LIB_DIR)/$@ $(^F) $(ARSTRIP) ) || ( $(RM) $(LIB_DIR)/$@ && false ) DY := $(AR) DFLAGS := -dynamic -flat_namespace -undefined warning -multiply_defined suppress -single_module $(LIBPATHS) DY_OUT := -o$(subst x,x, ) DLIBS := $(foreach lib,$(SYSLIBS),-l$(lib)) -DY_RULE = $(DY) $(DFLAGS) -install_name "harbour$(DYN_EXT)" -compatibility_version $(HB_VER_MAJOR).$(HB_VER_MINOR) -current_version $(HB_VER_MAJOR).$(HB_VER_MINOR).$(HB_VER_RELEASE) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) && $(LN) $(DYN_DIR)/$@ $(DYN_FILE2) && $(LN) $(DYN_DIR)/$@ $(DYN_DIR)/$(DYN_PREF)$(DYNNAME2).$(HB_VER_MAJOR)$(DYN_EXT) +DY_RULE = $(DY) $(DFLAGS) -install_name "harbour$(DYN_EXT)" -compatibility_version $(HB_VER_MAJOR).$(HB_VER_MINOR) -current_version $(HB_VER_MAJOR).$(HB_VER_MINOR).$(HB_VER_RELEASE) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(DYN_DIR)/$@ $(DYN_FILE2) && $(LN) $(DYN_DIR)/$@ $(DYN_DIR)/$(DYN_PREF)$(DYNNAME2).$(HB_VER_MAJOR)$(DYN_EXT) include $(TOP)$(ROOT)config/rules.mk diff --git a/harbour/config/darwin/gcc.mk b/harbour/config/darwin/gcc.mk index 6c19fa2e83..1da78dc96a 100644 --- a/harbour/config/darwin/gcc.mk +++ b/harbour/config/darwin/gcc.mk @@ -55,13 +55,13 @@ LDFLAGS += $(LIBPATHS) AR := libtool ARFLAGS := -AR_RULE = $(AR) -static $(ARFLAGS) $(HB_USER_AFLAGS) -o $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false ) +AR_RULE = ( $(AR) -static $(ARFLAGS) $(HB_USER_AFLAGS) -o $(LIB_DIR)/$@ $(^F) $(ARSTRIP) ) || ( $(RM) $(LIB_DIR)/$@ && false ) DY := $(AR) DFLAGS := -dynamic -flat_namespace -undefined warning -multiply_defined suppress -single_module $(LIBPATHS) DY_OUT := -o$(subst x,x, ) DLIBS := $(foreach lib,$(SYSLIBS),-l$(lib)) -DY_RULE = $(DY) $(DFLAGS) -install_name "harbour$(DYN_EXT)" -compatibility_version $(HB_VER_MAJOR).$(HB_VER_MINOR) -current_version $(HB_VER_MAJOR).$(HB_VER_MINOR).$(HB_VER_RELEASE) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) && $(LN) $(DYN_DIR)/$@ $(DYN_FILE2) && $(LN) $(DYN_DIR)/$@ $(DYN_DIR)/$(DYN_PREF)$(DYNNAME2).$(HB_VER_MAJOR)$(DYN_EXT) +DY_RULE = $(DY) $(DFLAGS) -install_name "harbour$(DYN_EXT)" -compatibility_version $(HB_VER_MAJOR).$(HB_VER_MINOR) -current_version $(HB_VER_MAJOR).$(HB_VER_MINOR).$(HB_VER_RELEASE) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(DYN_DIR)/$@ $(DYN_FILE2) && $(LN) $(DYN_DIR)/$@ $(DYN_DIR)/$(DYN_PREF)$(DYNNAME2).$(HB_VER_MAJOR)$(DYN_EXT) include $(TOP)$(ROOT)config/rules.mk diff --git a/harbour/config/darwin/global.mk b/harbour/config/darwin/global.mk index 7b6d65d5d0..d49a985ccf 100644 --- a/harbour/config/darwin/global.mk +++ b/harbour/config/darwin/global.mk @@ -9,3 +9,11 @@ DYN_EXT := .dylib DYN_PREF := lib HB_GT_LIBS += gttrm + +ifneq ($(filter $(HB_BUILD_STRIP),all lib),) + ARSTRIP = && strip -S $(LIB_DIR)/$@ +endif +ifneq ($(filter $(HB_BUILD_STRIP),all bin),) + LDSTRIP = && strip $(BIN_DIR)/$@ + DYSTRIP = && strip -S $(DYN_DIR)/$@ +endif diff --git a/harbour/config/darwin/icc.mk b/harbour/config/darwin/icc.mk index 75300ce023..1bc1b49da4 100644 --- a/harbour/config/darwin/icc.mk +++ b/harbour/config/darwin/icc.mk @@ -44,7 +44,7 @@ LDFLAGS += $(LIBPATHS) AR := libtool ARFLAGS := -AR_RULE = $(AR) -static $(ARFLAGS) $(HB_USER_AFLAGS) -o $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false ) +AR_RULE = ( $(AR) -static $(ARFLAGS) $(HB_USER_AFLAGS) -o $(LIB_DIR)/$@ $(^F) $(ARSTRIP) ) || ( $(RM) $(LIB_DIR)/$@ && false ) DY := $(AR) DFLAGS := -dynamic -flat_namespace -undefined warning -multiply_defined suppress -single_module $(LIBPATHS) @@ -59,7 +59,7 @@ endef define create_dynlib $(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,) $(foreach file,$^,$(dyn_object)) - $(DY) $(DFLAGS) -install_name "harbour$(DYN_EXT)" -compatibility_version $(HB_VER_MAJOR).$(HB_VER_MINOR) -current_version $(HB_VER_MAJOR).$(HB_VER_MINOR).$(HB_VER_RELEASE) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ -filelist __dyn__.tmp $(DLIBS) + $(DY) $(DFLAGS) -install_name "harbour$(DYN_EXT)" -compatibility_version $(HB_VER_MAJOR).$(HB_VER_MINOR) -current_version $(HB_VER_MAJOR).$(HB_VER_MINOR).$(HB_VER_RELEASE) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ -filelist __dyn__.tmp $(DLIBS) $(DYSTRIP) $(LN) $(DYN_DIR)/$@ $(DYN_FILE2) $(LN) $(DYN_DIR)/$@ $(DYN_DIR)/$(DYN_PREF)$(DYNNAME2).$(HB_VER_MAJOR)$(DYN_EXT) endef diff --git a/harbour/config/rules.mk b/harbour/config/rules.mk index de31a0552a..4671e62153 100644 --- a/harbour/config/rules.mk +++ b/harbour/config/rules.mk @@ -63,7 +63,7 @@ endif # The rule to link an executable. ifeq ($(LD_RULE),) - LD_RULE = $(LD) $(CFLAGS) $(LD_OUT)$(subst /,$(DIRSEP),$(BIN_DIR)/$@) $(^F) $(LDFLAGS) $(HB_LDFLAGS) $(HB_USER_LDFLAGS) $(LDLIBS) + LD_RULE = $(LD) $(CFLAGS) $(LD_OUT)$(subst /,$(DIRSEP),$(BIN_DIR)/$@) $(^F) $(LDFLAGS) $(HB_LDFLAGS) $(HB_USER_LDFLAGS) $(LDLIBS) $(LDSTRIP) endif # Eliminate these rules. diff --git a/harbour/contrib/gtqtc/Makefile b/harbour/contrib/gtqtc/Makefile index 1250529ffd..9b477942e9 100644 --- a/harbour/contrib/gtqtc/Makefile +++ b/harbour/contrib/gtqtc/Makefile @@ -15,6 +15,9 @@ CPP_SOURCES := \ PRG_HEADERS := \ hbgtqtc.ch +# force redetect. needed for _QT_DARWIN trick +HB_HAS_QT := + _DET_DSP_NAME := qt _DET_VAR_INC_ := HB_INC_QT _DET_VAR_HAS_ := HB_HAS_QT diff --git a/harbour/contrib/gtqtc/gtqtcs/Makefile b/harbour/contrib/gtqtc/gtqtcs/Makefile index d7e5d75405..2a9649ee2b 100644 --- a/harbour/contrib/gtqtc/gtqtcs/Makefile +++ b/harbour/contrib/gtqtc/gtqtcs/Makefile @@ -18,6 +18,9 @@ CPP_SOURCES := \ PRG_HEADERS := \ hbgtqtc.ch +# force redetect. needed for _QT_DARWIN trick +HB_HAS_QT := + _DET_DSP_NAME := qt _DET_VAR_INC_ := HB_INC_QT _DET_VAR_HAS_ := HB_HAS_QT diff --git a/harbour/contrib/hbqt/Makefile b/harbour/contrib/hbqt/Makefile index c54057d973..8c37cc13b4 100644 --- a/harbour/contrib/hbqt/Makefile +++ b/harbour/contrib/hbqt/Makefile @@ -11,6 +11,9 @@ LIBNAME := hbqt PRG_HEADERS := \ hbqt.ch \ +# force redetect. needed for _QT_DARWIN trick +HB_HAS_QT := + _DET_DSP_NAME := qt _DET_VAR_INC_ := HB_INC_QT _DET_VAR_HAS_ := HB_HAS_QT diff --git a/harbour/contrib/hbqt/hbqts/Makefile b/harbour/contrib/hbqt/hbqts/Makefile index 5992638cdd..ed8d63172c 100644 --- a/harbour/contrib/hbqt/hbqts/Makefile +++ b/harbour/contrib/hbqt/hbqts/Makefile @@ -14,6 +14,9 @@ LIBNAME := hbqts PRG_HEADERS := \ hbqt.ch \ +# force redetect. needed for _QT_DARWIN trick +HB_HAS_QT := + _DET_DSP_NAME := qt _DET_VAR_INC_ := HB_INC_QT _DET_VAR_HAS_ := HB_HAS_QT diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index c576f44c09..058df40fb6 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -2173,6 +2173,8 @@ FUNCTION hbmk( aArgs, /* @ */ lPause ) AAdd( hbmk[ _HBMK_aOPTL ], "-static" ) ENDIF IF hbmk[ _HBMK_cPLAT ] == "darwin" .AND. hbmk[ _HBMK_cCOMP ] == "gcc" + /* It's to avoid warning message generated when 'long double' is used + remove it if you have newer compiler version */ /* AAdd( hbmk[ _HBMK_aOPTC ], "-Wno-long-double" ) */ IF hbmk[ _HBMK_lSHARED ] AAdd( hbmk[ _HBMK_aOPTL ], "-bind_at_load" )