Files
harbour-core/harbour/src/vm/Makefile
Przemyslaw Czerpak 65388ee4af 2010-02-10 12:34 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/pp/Makefile
  * harbour/src/pp/hbpp.c
    ! fixed compilation with HB_DYNLIB macro

  - harbour/src/vm/maindll.c
    - removed unused dummy file

  * harbour/src/vm/Makefile
  * harbour/include/hbapi.h
  + harbour/src/vm/procaddr.c
    + added hb_vmProcAddress() function

  * harbour/include/hbdefs.h
    + added HB_EXPORT_ATTR and HB_IMPORT_ATTR macros - they are always
      defined regardless of HB_DYNLIB macro state

  * harbour/src/vm/maindllh/Makefile
    * disabled HB_DYNLIB

  * harbour/src/vm/maindllp/Makefile
  + harbour/src/vm/maindllp/dllpcode.c
    + added new import library for PCODE DLLs. It contains wrappers for
      hb_vmProcessSymbols() and hb_vmExecute() implemented in a way
      which creates minimal speed overhead.
    + added error reporting (MessageBox()) when redirected functions
      cannot be found.
    + added hb_dllGetProcAddress() C function

  * harbour/include/hbtypes.h
  - harbour/src/vm/maindllp.c
  + harbour/src/vm/maindllp/dllext.c
    * moved old wrappers to some of extended and array API functions
      into separate file
    * updated to use hb_dllGetProcAddress()
    - removed functions which should not be used by user code
    % cleaned, optimized and added error reporting to function wrappers.

    I do not know who chose exported functions but it looks like a
    quite random set which should be extended for real functionality.
    If someone is interested then he can do that. I updated this file
    only for backward compatibility.

   Above modifications allows to use PCODE DLLs with any application
   also static ones using Harbour compiled without exported symbols.
   It's enough to link it with this function:
      HB_EXPORT_ATTR PHB_FUNC dll_hb_vmProcAddress( const char * szFuncName )
      {
         return hb_vmProcAddress( szFuncName );
      }
   The official form of including above function to final binaries is not
   defined yet.
2010-02-10 11:34:42 +00:00

132 lines
2.0 KiB
Makefile

#
# $Id$
#
ROOT := ../../
include $(TOP)$(ROOT)config/global.mk
ifeq ($(HB_HVM_ALL),)
HB_HVM_ALL := yes
ifeq ($(HB_COMPILER),watcom)
ifeq ($(HB_BUILD_MODE),cpp)
HB_HVM_ALL := no
endif
endif
ifeq ($(HB_COMPILER),bcc)
HB_HVM_ALL := no
endif
ifeq ($(HB_COMPILER),pocc)
HB_HVM_ALL := no
endif
ifeq ($(HB_COMPILER),pocc64)
HB_HVM_ALL := no
endif
ifeq ($(HB_COMPILER),poccarm)
HB_HVM_ALL := no
endif
ifeq ($(HB_COMPILER),xcc)
HB_HVM_ALL := no
endif
ifeq ($(HB_COMPILER),dmc)
HB_HVM_ALL := no
endif
export HB_HVM_ALL
endif
DIRS :=
ifeq ($(HB_PLATFORM),win)
ifeq ($(HB_COMPILER),mingw)
C_MAIN := mainwin.c
else
C_MAIN := mainstd.c mainwin.c
endif
DIRS := mainstd mainwin maindllh maindllp
else
ifeq ($(HB_PLATFORM),wce)
C_MAIN := mainwin.c
DIRS := mainstd mainwin maindllh maindllp
else
ifeq ($(HB_PLATFORM),os2)
C_MAIN := mainstd.c
DIRS := mainstd maindllh
else
C_MAIN := main.c
endif
endif
endif
ifeq ($(HB_HVM_ALL),yes)
C_SOURCES := \
hvmall.c \
else
C_SOURCES := \
hvm.c \
arrays.c \
classes.c \
dynsym.c \
codebloc.c \
estack.c \
extend.c \
fm.c \
garbage.c \
hashes.c \
itemapi.c \
strapi.c \
macro.c \
memvars.c \
set.c \
thread.c \
endif
C_SOURCES += \
arrayshb.c \
asort.c \
break.c \
cmdarg.c \
debug.c \
dynlibhb.c \
eval.c \
evalhb.c \
extrap.c \
hashfunc.c \
initexit.c \
initsymb.c \
memvclip.c \
pcount.c \
pvalue.c \
proc.c \
procaddr.c \
runner.c \
vm.c \
$(C_MAIN) \
PRG_SOURCES := \
harbinit.prg \
LIBNAME := hbvm
ifneq ($(HB_MT),yes)
ifeq ($(HB_PLATFORM),dos)
ifneq ($(HB_COMPILER),djgpp)
ifneq ($(HB_COMPILER),watcom)
HB_MT := no
endif
endif
endif
endif
ifneq ($(HB_MT),no)
DIRS += vmmt
endif
include $(TOP)$(ROOT)config/lib.mk
ifneq ($(DIRS),)
include $(TOP)$(ROOT)config/dir.mk
endif