diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 15c330b14c..15a03f3b92 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,14 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-21 11:29 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * source/dynlib/Makefile + * source/Makefile + * config/rules.mk + * config/dyn.mk + + Respect HB_BUILD_DLL=no setting. + * Don't try to create .dll if there were no compiler local rules set. + 2009-08-21 10:54 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * source/pp/Makefile * bin/hb-mkdyn.bat diff --git a/harbour/config/dyn.mk b/harbour/config/dyn.mk index a2fa51ef8d..5b7a2f19a1 100644 --- a/harbour/config/dyn.mk +++ b/harbour/config/dyn.mk @@ -4,6 +4,7 @@ include $(TOP)$(ROOT)config/global.mk +ifneq ($(HB_BUILD_DLL),no) ifneq ($(HB_ARCHITECTURE),) ifneq ($(HB_COMPILER),) @@ -33,3 +34,4 @@ include $(TOP)$(ROOT)config/install.mk endif endif +endif diff --git a/harbour/config/rules.mk b/harbour/config/rules.mk index f445448d87..1d4fdeeb55 100644 --- a/harbour/config/rules.mk +++ b/harbour/config/rules.mk @@ -59,7 +59,7 @@ endif # The rule to link a dynamic library. ifeq ($(DY_RULE),) - DY_RULE = $(DY) $(DY_OUT)$(subst /,$(DIRSEP),$(BIN_DIR)/$@) $^ $(DFLAGS) $(HB_USER_DFLAGS) $(DLIBS) +# DY_RULE = $(DY) $(DY_OUT)$(subst /,$(DIRSEP),$(BIN_DIR)/$@) $^ $(DFLAGS) $(HB_USER_DFLAGS) $(DLIBS) endif # Eliminate these rules. @@ -90,6 +90,12 @@ endif %.c : $(GRANDP)%.prg $(HB_RULE) +ifneq ($(HB_BUILD_DLL),no) +ifneq ($(DY_RULE),) + # Rule to generate an dynamic library from an object file. %$(DYN_EXT) : %_dyn$(OBJ_EXT) $(DY_RULE) + +endif +endif diff --git a/harbour/source/Makefile b/harbour/source/Makefile index d37d65f52d..cba4a26c26 100644 --- a/harbour/source/Makefile +++ b/harbour/source/Makefile @@ -38,8 +38,11 @@ DIRS := \ hbextern$(HB_COMP_REF) \ hbpcre \ hbzlib \ - debug$(HB_COMP_REF) \ - dynlib{codepage,common,hbextern,hbpcre,hbzlib,lang,macro,pp,rdd,rtl,vm} \ + debug$(HB_COMP_REF) + + ifneq ($(HB_BUILD_DLL),no) + DIRS += dynlib{codepage,common,hbextern,hbpcre,hbzlib,lang,macro,pp,rdd,rtl,vm} \ + endif endif diff --git a/harbour/source/dynlib/Makefile b/harbour/source/dynlib/Makefile index dc08b83f3f..856f82f2f0 100644 --- a/harbour/source/dynlib/Makefile +++ b/harbour/source/dynlib/Makefile @@ -6,58 +6,62 @@ ROOT := ../../ include $(TOP)$(ROOT)config/global.mk -ifneq ($(HB_ARCHITECTURE),dos) +ifneq ($(HB_BUILD_DLL),no) + ifneq ($(HB_ARCHITECTURE),dos) - DYNNAME_POST := -$(HB_DYN_VER) + DYNNAME_POST := -$(HB_DYN_VER) - ifeq ($(HB_ARCHITECTURE),win) - ifeq ($(HB_COMPILER),bcc) - DYNNAME_POST := $(DYNNAME_POST)-bcc - else - ifeq ($(HB_CPU),x86_64) - DYNNAME_POST := $(DYNNAME_POST)-x64 + ifeq ($(HB_ARCHITECTURE),win) + ifeq ($(HB_COMPILER),bcc) + DYNNAME_POST := $(DYNNAME_POST)-bcc else - ifeq ($(HB_CPU),ia64) - DYNNAME_POST := $(DYNNAME_POST)-ia64 + ifeq ($(HB_CPU),x86_64) + DYNNAME_POST := $(DYNNAME_POST)-x64 + else + ifeq ($(HB_CPU),ia64) + DYNNAME_POST := $(DYNNAME_POST)-ia64 + endif endif endif - endif - else - ifeq ($(HB_ARCHITECTURE),wce) - DYNNAME_POST := $(DYNNAME_POST)-wce - ifeq ($(HB_CPU),arm) - DYNNAME_POST := $(DYNNAME_POST)-arm - else - ifeq ($(HB_CPU),mips) - DYNNAME_POST := $(DYNNAME_POST)-mips + else + ifeq ($(HB_ARCHITECTURE),wce) + DYNNAME_POST := $(DYNNAME_POST)-wce + ifeq ($(HB_CPU),arm) + DYNNAME_POST := $(DYNNAME_POST)-arm else - ifeq ($(HB_CPU),sh) - DYNNAME_POST := $(DYNNAME_POST)-sh + ifeq ($(HB_CPU),mips) + DYNNAME_POST := $(DYNNAME_POST)-mips + else + ifeq ($(HB_CPU),sh) + DYNNAME_POST := $(DYNNAME_POST)-sh + endif endif endif endif endif - endif - DYNDIRLIST_BASE := source/common source/pp source/rtl source/macro source/lang source/codepage source/hbpcre source/hbzlib source/hbextern source/rdd source/rdd/dbfntx source/rdd/dbfnsx source/rdd/dbfcdx source/rdd/dbffpt source/rdd/hbsix source/rdd/hsx source/rdd/usrrdd source/rtl/gtcgi source/rtl/gtpca source/rtl/gtstd source/rtl/gtwvt source/rtl/gtgui - ifneq ($(HB_ARCHITECTURE),wce) - DYNDIRLIST_BASE += source/rtl/gtwin - endif - ifeq ($(HB_ARCHITECTURE)-$(HB_COMPILER),win-watcom) - DYNDIRLIST_BASE += source/vm/maindllh - endif + DYNDIRLIST_BASE := source/common source/pp source/rtl source/macro source/lang source/codepage source/hbpcre source/hbzlib source/hbextern source/rdd source/rdd/dbfntx source/rdd/dbfnsx source/rdd/dbfcdx source/rdd/dbffpt source/rdd/hbsix source/rdd/hsx source/rdd/usrrdd source/rtl/gtcgi source/rtl/gtpca source/rtl/gtstd source/rtl/gtwvt source/rtl/gtgui + ifneq ($(HB_ARCHITECTURE),wce) + DYNDIRLIST_BASE += source/rtl/gtwin + endif + ifeq ($(HB_ARCHITECTURE)-$(HB_COMPILER),win-watcom) + DYNDIRLIST_BASE += source/vm/maindllh + endif - export DYNDIRLIST_BASE - export DYNNAME_POST + export DYNDIRLIST_BASE + export DYNNAME_POST - DYNDIRLIST := $(DYNDIRLIST_BASE) source/vm - DYNNAME := harbour$(DYNNAME_POST) + DYNDIRLIST := $(DYNDIRLIST_BASE) source/vm + DYNNAME := harbour$(DYNNAME_POST) - DIRS := mt + DIRS := mt - include $(TOP)$(ROOT)config/dyn.mk - ifneq ($(DIRS),) - include $(TOP)$(ROOT)config/dir.mk + include $(TOP)$(ROOT)config/dyn.mk + ifneq ($(DIRS),) + include $(TOP)$(ROOT)config/dir.mk + endif + else + include $(TOP)$(ROOT)config/none.mk endif else include $(TOP)$(ROOT)config/none.mk