* config/darwin/clang.mk
* config/darwin/gcc.mk
* config/darwin/global.mk
* config/darwin/icc.mk
* config/darwin/libs.mk
* utils/hbmk2/hbmk2.prg
* synced with Viktor's modifications in 3.4 branch:
; 2017-11-11 13:14 UTC Viktor Szakats:
* switch to call the C compiler to link dynamic libs on darwin,
which is the recommended way to do this, as suggested by Apple.
This also aligns the platform better with other *nix platforms.
'libtool' was used before, but that started having intermittent
issues around Sierra (mitigated by disabling parallel build),
which returned and got worse in High Sierra (with no remedy).
The symptom was 'ld: file not found: ' errors with the filename
not shown or appearing as garbage, then a 'libtool: internal link
edit command failed'. This was reported and will be fixed in a
future Xcode release.
Ref: Apple Radar 34944562
* config/global.mk
* config/rules.mk
+ added new user build envvar HB_USER_DCFLAGS
It allows to set C compiler parameters to compile .c code for
dynamic libraries.
* src/rtl/hbsocket.c
! fixed fcntl(F_SETFL) 3-rd parameter in hb_socketSetBlockingIO(),
By mistake I used long instead of int. it created problem on big
endian 64 bit machines.
* include/hbgtcore.h
* src/rtl/hbgtcore.c
+ added new C functions for GT programmers:
void hb_gt_BaseUnlock( PHB_GT pGT );
void hb_gt_BaseLock( PHB_GT pGT );
void hb_gtSleep( PHB_GT pGT, double dSeconds );
* src/rtl/hbgtcore.c
* src/rtl/gtcrs/gtcrs.c
* src/rtl/gtdos/gtdos.c
* src/rtl/gtgui/gtgui.c
* src/rtl/gtos2/gtos2.c
* src/rtl/gtpca/gtpca.c
* src/rtl/gtsln/gtsln.c
* src/rtl/gtstd/gtstd.c
* src/rtl/gttrm/gttrm.c
* src/rtl/gtwin/gtwin.c
* src/rtl/gtwvt/gtwvt.c
* src/rtl/gtxwc/gtxwc.c
* use new functions to unblock GT when low level TONE() code is
executed. It allows other threads to access shared GT driver
when one of them executes TONE()
* contrib/hbexpat/hbexpat.hbx
* regenerated automatically
69 lines
1.5 KiB
Makefile
69 lines
1.5 KiB
Makefile
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
|
|
|
|
ifeq ($(filter $(HB_PLATFORM),darwin win),)
|
|
HB_DYN_COPT := -DHB_DYNLIB -fPIC
|
|
endif
|
|
|
|
CC := $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP)$(HB_CCSUFFIX)
|
|
ifneq ($(filter --analyze, $(HB_USER_CFLAGS)),)
|
|
CC_IN :=
|
|
else
|
|
CC_IN := -c
|
|
endif
|
|
# NOTE: Works also without the ending space after -o.
|
|
CC_OUT := -o$(subst x,x, )
|
|
|
|
CFLAGS += -I. -I$(HB_HOST_INC)
|
|
|
|
# -fno-common enables building .dylib files
|
|
CFLAGS += -fno-common
|
|
|
|
ifneq ($(HB_BUILD_WARN),no)
|
|
CFLAGS += -W -Wall
|
|
else
|
|
CFLAGS += -Wmissing-braces -Wreturn-type -Wformat
|
|
ifneq ($(HB_BUILD_MODE),cpp)
|
|
CFLAGS += -Wimplicit-int -Wimplicit-function-declaration
|
|
endif
|
|
endif
|
|
|
|
ifneq ($(HB_BUILD_OPTIM),no)
|
|
CFLAGS += -O3
|
|
endif
|
|
|
|
ifeq ($(HB_BUILD_DEBUG),yes)
|
|
CFLAGS += -g
|
|
endif
|
|
|
|
# It's to avoid warning message generated when 'long double' is used
|
|
# remove it if you have newer compiler version
|
|
#CFLAGS += -Wno-long-double
|
|
|
|
LD := $(CC)
|
|
LD_OUT := -o$(subst x,x, )
|
|
|
|
LIBPATHS := $(foreach dir,$(LIB_DIR) $(SYSLIBPATHS),-L$(dir))
|
|
|
|
LDLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(SYSLIBS),-l$(lib))
|
|
LDFLAGS += $(LIBPATHS)
|
|
|
|
DY := $(CC)
|
|
DLIBS := $(foreach lib,$(HB_USER_LIBS) $(SYSLIBS),-l$(lib))
|
|
DFLAGS += $(LIBPATHS)
|
|
|
|
include $(TOP)$(ROOT)config/rules.mk
|