* harbour/include/hbcomp.h
* do not inherit in macrocompiler -z compile time switch when -kc is
also used
* harbour/src/common/expropt2.c
* disable logical expression optimization (reduction) in macrocompiler
when -kc compile time switch is used.
* harbour/config/beos/gcc.mk
* harbour/config/qnx/gcc.mk
* harbour/config/bsd/gcc.mk
* harbour/config/wce/mingwarm.mk
* harbour/config/vxworks/gcc.mk
* harbour/config/hpux/gcc.mk
* harbour/config/darwin/gcc.mk
* harbour/config/dos/djgpp.mk
* harbour/config/win/mingw.mk
* harbour/config/linux/gcc.mk
* harbour/config/cygwin/gcc.mk
* harbour/config/symbian/gcc.mk
* harbour/config/os2/gcc.mk
* harbour/config/sunos/gcc.mk
* harbour/utils/hbmk2/hbmk2.prg
* enable some important warnings in GCC builds using -W<name>... instead
of -Wall and -Wno-<name>... for warning level set to low.
It should help in backward compatibility with some older GCC versions.
58 lines
1.2 KiB
Makefile
58 lines
1.2 KiB
Makefile
#
|
|
# $Id$
|
|
#
|
|
|
|
ifeq ($(HB_CMP),)
|
|
ifeq ($(HB_BUILD_MODE),cpp)
|
|
HB_CMP := g++
|
|
else
|
|
HB_CMP := gcc
|
|
endif
|
|
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)
|
|
CC_IN := -c
|
|
CC_OUT := -o
|
|
|
|
CFLAGS += -I. -I$(HB_HOST_INC)
|
|
|
|
ifneq ($(HB_BUILD_WARN),no)
|
|
CFLAGS += -W -Wall
|
|
else
|
|
CFLAGS += -Wimplicit-int -Wimplicit-function-declaration -Wmissing-braces -Wreturn-type -Wformat
|
|
endif
|
|
|
|
ifneq ($(HB_BUILD_OPTIM),no)
|
|
CFLAGS += -O3
|
|
endif
|
|
|
|
ifeq ($(HB_BUILD_DEBUG),yes)
|
|
CFLAGS += -g
|
|
endif
|
|
|
|
LD := $(CC)
|
|
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
|