Files
harbour-core/config/sunos/sunpro.mk
Viktor Szakats fa876ddc8a 2017-09-13 11:40 UTC Viktor Szakats (vszakats users.noreply.github.com)
* config/*/*.mk
  * config/*.mk
  * config/postinst.hb
  * ChangeLog.txt
  * src/rdd/usrrdd/rdds/*.prg
    * sync with 3.4 fork minor code changes, comments, some strings
2017-09-13 11:51:47 +00:00

76 lines
2.0 KiB
Makefile

ifeq ($(HB_BUILD_MODE),cpp)
HB_CMP := sunCC
else
HB_CMP := suncc
endif
OBJ_EXT := .o
LIB_PREF := lib
LIB_EXT := .a
HB_DYN_COPT := -DHB_DYNLIB
ifeq ($(findstring sparc,$(shell isalist)),sparc)
HB_DYN_COPT += -xcode=pic32
else
HB_DYN_COPT += -KPIC
endif
CC := $(HB_CCACHE) $(HB_CCPATH)$(HB_CCPREFIX)$(HB_CMP)$(HB_CCSUFFIX)
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, )
CXX := $(HB_CCACHE) $(HB_CCPATH)$(HB_CCPREFIX)sunCC$(HB_CCSUFFIX)
CFLAGS += -I. -I$(HB_HOST_INC)
# try to keep `-fast' as left as possible, as later optimization
# flags may override values set by `-fast', and this way
# no warnings are generated.
ifneq ($(HB_BUILD_OPTIM),no)
# Together with $(HB_ISAOPT) above, these are supposed to (somewhat)
# conform to the Blastwave build standards, see
# https://web.archive.org/web/wiki.blastwave.org/mediawiki/index.php/Build_Standards
# Try to keep them this way.
CFLAGS += -fast
CFLAGS += -xnolibmopt
endif
export HB_ISAOPT
CFLAGS += $(HB_ISAOPT)
LDFLAGS += $(HB_ISAOPT)
ifneq ($(HB_BUILD_WARN),no)
CFLAGS += -erroff=%none
endif
ifeq ($(HB_BUILD_DEBUG),yes)
CFLAGS += -g
endif
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)
AR := ar
AR_RULE = ( $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) rcs $(LIB_DIR)/$@ $(^F) $(ARSTRIP) ) || ( $(RM) $(LIB_DIR)/$@ && $(FALSE) )
DY := $(CC)
DFLAGS += -G $(HB_ISAOPT) $(LIBPATHS)
ifneq ($(HB_BUILD_OPTIM),no)
DFLAGS += -fast -xnolibmopt
endif
DY_OUT := -o$(subst x,x, )
DLIBS := $(foreach lib,$(HB_USER_LIBS) $(SYSLIBS),-l$(lib))
DY_RULE = $(DY) $(DFLAGS) -h $(DYN_NAME_CPT) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(@F) $(DYN_FILE_NVR) && $(LN) $(@F) $(DYN_FILE_CPT)
include $(TOP)$(ROOT)config/rules.mk