diff --git a/harbour/ChangeLog b/harbour/ChangeLog index d4e8b1ea5e..7f2bf98908 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,13 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-23 01:08 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * config/linux/watcom.mk + + Added dynamic library generation for linux/watcom. + Experimental. + NOTE: DFLAGS is a little tricky as I found no 'SYSTEM' + preset for ELF DLLs. + 2009-08-22 16:01 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbxbp/tests/demoxbp.prg ! Fixed codeblock unused variable warnings. diff --git a/harbour/config/linux/watcom.mk b/harbour/config/linux/watcom.mk index 35ca4a026b..20b25f9724 100644 --- a/harbour/config/linux/watcom.mk +++ b/harbour/config/linux/watcom.mk @@ -61,4 +61,22 @@ LDFLAGS += SYS linux LDLIBS := $(foreach lib,$(LIBS),$(LIB_DIR)/$(lib)) +DY := $(LD) +DFLAGS := OP quiet FORM elf dll LIBPATH $(WATCOM)/lib386 LIBPATH $(WATCOM)/lib386/linux RUNTIME linux OP exportall OP norelocs +DY_OUT := +DLIBS := + +# NOTE: The empty line directly before 'endef' HAVE TO exist! +define dyn_object + @$(ECHO) $(ECHOQUOTE)FILE '$(file)'$(ECHOQUOTE) >> __dyn__.tmp + +endef +define create_dynlib + $(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,) + $(foreach file,$^,$(dyn_object)) + $(DY) $(DFLAGS) $(HB_USER_DFLAGS) NAME '$(subst /,$(DIRSEP),$(DYN_DIR)/$@)' @__dyn__.tmp +endef + +DY_RULE = $(create_dynlib) + include $(TOP)$(ROOT)config/common/watcom.mk