* config/global.mk
% Minor optimization for Windows platform
! At the same time fix for CreateProcess( 'uname' ) error on Win9x.
* config/wce/mingwarm.mk
* config/win/mingw.mk
* config/win/cygwin.mk
! Fix to previous: In multi-command cmdlines, f.e.: '(cmd1 && cmd2)'
$(RM) command _must_ be used as a workaround so that GNU Make
converts it to a batch file. Unfortunately with this, an 'ar'
failure will be masked by a successful $(RM), so the make won't
stop.
* config/globsh.mk
+ Added new command macro $(FALSE) preparing for general solution
to force failure.
* config/beos/gcc.mk
* config/qnx/gcc.mk
* config/bsd/gcc.mk
* config/bsd/clang.mk
* config/darwin/gcc.mk
* config/darwin/icc.mk
* config/darwin/clang.mk
* config/hpux/gcc.mk
* config/linux/gcc.mk
* config/linux/icc.mk
* config/linux/clang.mk
* config/linux/sunpro.mk
* config/sunos/gcc.mk
* config/sunos/sunpro.mk
* config/instsh.mk
* 'false' -> '$(FALSE)' for shell independence.
68 lines
1.9 KiB
Makefile
68 lines
1.9 KiB
Makefile
#
|
|
# $Id$
|
|
#
|
|
|
|
ifeq ($(HB_BUILD_MODE),cpp)
|
|
HB_CMP := g++
|
|
else
|
|
# for old Darwin systems (having GCC 2.95) this may need to be
|
|
# redefined to 'cc'.
|
|
HB_CMP := gcc
|
|
endif
|
|
|
|
OBJ_EXT := .o
|
|
LIB_PREF := lib
|
|
LIB_EXT := .a
|
|
|
|
CC := $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP)$(HB_CCPOSTFIX)
|
|
CC_IN := -c
|
|
# NOTE: The ending space after -o is important, please preserve it.
|
|
# Now solved with '$(subst x,x, )' expression.
|
|
CC_OUT := -o$(subst x,x, )
|
|
|
|
CFLAGS += -I. -I$(HB_INC_COMPILE)
|
|
|
|
# -no-cpp-precomp prevents from using buggy precompiled headers
|
|
# CFLAGS += -no-cpp-precomp
|
|
|
|
# -fno-common enables building .dylib files
|
|
CFLAGS += -fno-common
|
|
|
|
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
|
|
|
|
# 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 := $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP)$(HB_CCPOSTFIX)
|
|
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)
|
|
|
|
AR := libtool
|
|
AR_RULE = ( $(AR) -static $(ARFLAGS) $(HB_AFLAGS) $(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,$(HB_USER_LIBS) $(SYSLIBS),-l$(lib))
|
|
|
|
DY_RULE = $(DY) $(DFLAGS) -install_name "$(LIB_PREF)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) $(@F) $(DYN_FILE2) && $(LN) $(@F) $(DYN_DIR)/$(DYN_PREF)$(DYNNAME2).$(HB_VER_MAJOR)$(DYN_EXT)
|
|
|
|
include $(TOP)$(ROOT)config/rules.mk
|