Files
harbour-core/config/bin.mk
Przemysław Czerpak d074db1033 2015-12-15 23:48 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* config/dos/watcom.mk
  * config/win/watcom.mk
  * config/linux/watcom.mk
    ! enabled -bd OpenWatcom switch for code compiled as part of dynamic
      libraries
    * use CauseWay as default DOS extender for dynamic DOS builds

  * config/dyn.mk
  * config/lib.mk
  * src/Makefile
    ! fixed list of libraries used to create Harbour DLL in DOS builds

  * config/bin.mk
  * src/vm/Makefile
    * create hbmainstd library for OpenWatcom DOS shared builds

  * src/vm/maindllh.c
    + added DLL entry function for CauseWay DLLs in OpenWatcom builds

  * src/vm/main.c
    * include maindllh.c in OpenWatcom DOS shared builds

  * utils/hbmk2/hbmk2.prg
    + added support for dynamic binaries in DOS OpenWatcom builds.
      Support for CauseWay DLLs is still broken in current OpenWatcom
      builds so it will have to wait for the fix to be usable.

  * src/vm/dynlibhb.c
    + added support for dynamic libraries to OpenWatcom DOS builds.
      Now it's enabled only in harbour.dll due to problems with
      CW and current OW.

  * src/3rd/zlib/zconf.h
  * src/3rd/zlib/zlib.dif
    * use OS2 patch for exporting ZLIB symbols also in DOS builds

  * src/rdd/dbf1.c
    * pacified warning
2015-12-15 23:48:52 +01:00

175 lines
3.4 KiB
Makefile

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
else
ifeq ($(HB_PLATFORM)-$(HB_COMPILER),dos-watcom)
HB_LDFLAGS += FILE $(LIB_DIR)/hbmainstd.lib
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_BUILD_NOSYSLIB),)
SYSLIBS := $(filter-out $(__HB_BUILD_NOSYSLIB),$(SYSLIBS))
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