Files
harbour-core/harbour/config/bin.mk
Viktor Szakats 251a3a00ee 2011-02-22 13:11 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* config/postinst.hbs
  * config/global.mk
  * config/bin.mk
  * config/darwin/gcc.mk
  * config/darwin/icc.mk
  * config/darwin/clang.mk
  * config/linux/gcc.mk
  * config/dyn.mk
  * config/os2/gcc.mk
    * Trying to cleanup the harbour dynlib name situation.
      Here's the plan (which is similar to what's used in contrib area):
         win, wce: harbour-21[-subtype][.dll/.lib]
         dos, os2: harbour[.dll|.???]
         darwin:
            libharbour.2.1.0.dylib
            libharbour.2.1.dylib -> (symlink) [compatibility level]
            libharbour.dylib -> (symlink)
         *nix:
            # libharbour.s?.2.1.0
            # libharbour.s?.2.1 -> (symlink) [soname]
            # libharbour.s? -> (symlink)
    ; It's possible it's broken now. Pls test linux/gcc and darwin.
      'install' was not tested.
    ; TODO: Clean variable usage, there is some redundancy, plus
            some places where current solution is not generic, f.e.
            using HB_VER_*, HB_DYNLIB_BASE vs. HB_DYNLIB_NAME, etc.

  * harbour/src/rtl/fscopy.c
    * Reverted 2011-02-22 12:27 UTC+0200 Mindaugas Kavaliauskas
      which made behavior inconsistent with rest of similar
      functions like FERASE(), FRENAME(), which also don't throw
      RTE if bad parameter is passed, but return FERROR()
      and failure instead.
      Also restored _SET_DEFAULT handling to not create a special case
      compared to __COPYFILE() behavior, ia. some features like
      FXO_SHARELOCK are still enabled while FXO_DEFAULT is not).
      Pls rewrite it using hb_fsOpen()/hb_fsCreate() if that behavior
      bothers you.
2011-02-22 12:13:08 +00:00

178 lines
3.4 KiB
Makefile

#
# $Id$
#
include $(TOP)$(ROOT)config/global.mk
ifneq ($(HB_PLATFORM),)
ifneq ($(HB_COMPILER),)
# Assemble template lib list to help create a few common variations
BUILD_SHARED :=
ifeq ($(flavor LIBS),recursive)
ifeq ($(HB_BUILD_SHARED),yes)
BUILD_SHARED := yes
endif
endif
ifeq ($(BUILD_SHARED),yes)
HB_LIBS_TPL := \
hbcplr \
hbdebug \
ifeq ($(HB_PLATFORM),cygwin)
HB_LIBS_TPL += hbmainstd
else
ifneq ($(filter $(HB_PLATFORM),win wce),)
ifneq ($(filter $(HB_COMPILER),mingw mingw64 mingwarm),)
HB_LIBS_TPL += hbmainstd
else
ifeq ($(HB_COMPILER),watcom)
HB_LDFLAGS += FILE $(LIB_DIR)/hbmainstd.lib
else
HB_LIBS_TPL += hbmainstd hbmainwin
endif
endif
else
ifeq ($(HB_PLATFORM),os2)
ifeq ($(HB_COMPILER),watcom)
HB_LDFLAGS += FILE $(LIB_DIR)/hbmainstd.lib
else
HB_LIBS_TPL += hbmainstd
endif
endif
endif
endif
HB_LIBS_ST_RDD := $(HB_LIBS_TPL) $(HB_DYNLIB_BASE)
HB_LIBS_MT_RDD := $(HB_LIBS_TPL) $(HB_DYNLIB_BASE)
HB_LIBS_ST_NORDD := $(HB_LIBS_ST_RDD)
HB_LIBS_MT_NORDD := $(HB_LIBS_ST_RDD)
HB_LIBS_TPL :=
else
# (have to use '=' operator here)
HB_LIBS_TPL = \
hbextern \
hbdebug \
$(_HB_VM) \
hbrtl \
hblang \
hbcpage \
$(HB_GT_LIBS) \
$(_HB_RDD) \
hbrtl \
$(_HB_VM) \
hbmacro \
hbcplr \
hbpp \
hbcommon
ifneq ($(HB_HAS_PCRE_LOCAL),)
HB_LIBS_TPL += hbpcre
endif
ifneq ($(HB_HAS_ZLIB_LOCAL),)
HB_LIBS_TPL += hbzlib
endif
# Create a few common core lib lists
_HB_RDD := \
hbrdd \
rddntx \
rddnsx \
rddcdx \
rddfpt \
hbsix \
hbhsx \
hbusrrdd \
hbuddall
_HB_VM := hbvm
HB_LIBS_ST_RDD := $(HB_LIBS_TPL)
_HB_VM := hbvmmt
HB_LIBS_MT_RDD := $(HB_LIBS_TPL)
_HB_RDD := hbnulrdd
_HB_VM := hbvm
HB_LIBS_ST_NORDD := $(HB_LIBS_TPL)
_HB_VM := hbvmmt
HB_LIBS_MT_NORDD := $(HB_LIBS_TPL)
# Cleanup temp vars
HB_LIBS_TPL :=
_HB_RDD :=
_HB_VM :=
endif
HB_LINKING_RTL :=
HB_LINKING_VMMT :=
ifneq ($(filter hbrtl,$(LIBS)),)
HB_LINKING_RTL := yes
ifneq ($(filter hbvmmt,$(LIBS)),)
HB_LINKING_VMMT := yes
endif
endif
-include $(TOP)$(ROOT)config/$(HB_PLATFORM)/libs.mk
ifneq ($(HB_PLATFORM_UNIX),)
ifeq ($(BUILD_SHARED),yes)
SYSLIBS :=
SYSLIBPATHS :=
endif
endif
LIBS := $(HB_USER_LIBS) $(LIBS)
include $(TOP)$(ROOT)config/$(HB_PLATFORM)/$(HB_COMPILER).mk
include $(TOP)$(ROOT)config/c.mk
include $(TOP)$(ROOT)config/prg.mk
include $(TOP)$(ROOT)config/res.mk
BIN_NAME :=
ifneq ($(C_MAIN),)
ifeq ($(BIN_NAME),)
BIN_NAME := $(C_MAIN:.c=$(BIN_EXT))
endif
endif
ifneq ($(PRG_MAIN),)
ifeq ($(BIN_NAME),)
BIN_NAME := $(PRG_MAIN:.prg=$(BIN_EXT))
endif
endif
BIN_FILE := $(BIN_DIR)/$(BIN_NAME)
ALL_OBJS := $(ALL_C_OBJS) $(ALL_PRG_OBJS)
ifneq ($(RC),)
ALL_OBJS += $(ALL_RC_OBJS)
endif
first:: dirbase descend
descend:: dirbase
+@$(MK) $(MKFLAGS) -C $(OBJ_DIR) -f $(GRANDP)Makefile TOP=$(GRANDP) $(BIN_NAME)
vpath $(BIN_NAME) $(BIN_DIR)
$(BIN_NAME) : $(ALL_OBJS)
$(LD_RULE)
INSTALL_FILES := $(BIN_FILE)
INSTALL_DIR := $(HB_INSTALL_BIN)
include $(TOP)$(ROOT)config/instsh.mk
INSTALL_RULE_BIN := $(INSTALL_RULE)
ifneq ($(INSTALL_RULE_BIN),)
install:: first
$(INSTALL_RULE_BIN)
endif
endif
endif