From cb878dc42fa8f7e0d112de7ed573db9aca83e979 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 22 Aug 2009 08:46:50 +0000 Subject: [PATCH] 2009-08-22 10:45 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/os2/gcc.mk + Added .dll creation for os2/gcc. As the initial attempt I'm using the mingw method to pass object list to gcc. Please test. * config/globsh.mk * Changed $(MD) in os2 to use os2-mkdir. (this macro isn't used yet) + Added os2-cp slash requirement information. Although that was a different build than the one uploaded. ! Minor typo in comment. --- harbour/ChangeLog | 13 +++++++++++++ harbour/config/globsh.mk | 8 ++++---- harbour/config/os2/gcc.mk | 22 +++++++++++++++++++++- 3 files changed, 38 insertions(+), 5 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index e8f4e02da8..37fd10662c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,19 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-22 10:45 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * config/os2/gcc.mk + + Added .dll creation for os2/gcc. + As the initial attempt I'm using the mingw method to pass object + list to gcc. Please test. + + * config/globsh.mk + * Changed $(MD) in os2 to use os2-mkdir. (this macro isn't + used yet) + + Added os2-cp slash requirement information. Although that was + a different build than the one uploaded. + ! Minor typo in comment. + 2009-08-22 10:21 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/rules.mk * config/dyn.mk diff --git a/harbour/config/globsh.mk b/harbour/config/globsh.mk index 14ceacbc88..cd49b06ac6 100644 --- a/harbour/config/globsh.mk +++ b/harbour/config/globsh.mk @@ -79,8 +79,8 @@ ifeq ($(HB_SHELL),nt) # for Windows XP and upper and 2047 for Windows NT and 2000. # This is true for commands which are recognized as shell # commands (by using an internal list). For the rest -# CreateProcess() is used, where where the maximum length -# is 32767. [vszakats] +# CreateProcess() is used, where the maximum length is 32767. +# [vszakats] MK := "$(subst \,/,$(MAKE))" RM := del /q /f @@ -122,7 +122,7 @@ ifeq ($(HB_SHELL),os2) # NOTE: Comment on included GNU tools: # os2-mkdir expects forward slashes, while -# os2-rm expects backslashes in filenames. +# os2-rm and os2-cp expects backslashes in filenames. # [vszakats] MK := $(subst \,/,$(MAKE)) @@ -130,7 +130,7 @@ RM := $(TOOL_DIR)os2-rm -f RDP := $(TOOL_DIR)os2-rm -fr CP := copy LN := -MD := mkdir +MD := $(TOOL_DIR)os2-mkdir MDP := $(TOOL_DIR)os2-mkdir -p ECHO := echo ECHOQUOTE := diff --git a/harbour/config/os2/gcc.mk b/harbour/config/os2/gcc.mk index e0c3216930..854087245a 100644 --- a/harbour/config/os2/gcc.mk +++ b/harbour/config/os2/gcc.mk @@ -42,6 +42,8 @@ ifeq ($(C_MAIN),) endif endif +SYSLIBS := socket + LIBPATHS := -L$(LIB_DIR) LDLIBS := $(foreach lib,$(LIBS),-l$(lib)) @@ -55,7 +57,7 @@ ifneq ($(filter hbrtl, $(LIBS)),) endif endif - LDLIBS += -lsocket + LDLIBS += $(foreach lib,$(SYSLIBS),-l$(lib)) endif # statical linking with GCC 3.2.2 libc as not require its presence on user system @@ -91,4 +93,22 @@ AR := $(HB_CCPREFIX)ar ARFLAGS := AR_RULE = $(create_library) & $(RM) __lib__.tmp +DY := $(CC) +DFLAGS := -shared +DY_OUT := $(LD_OUT) +DLIBS := $(foreach lib,$(SYSLIBS),-l$(lib)) + +# NOTE: The empty line directly before 'endef' HAVE TO exist! +define dyn_object + @$(ECHO) $(ECHOQUOTE)INPUT($(subst \,/,$(file)))$(ECHOQUOTE) >> __dyn__.tmp + +endef +define create_dynlib + $(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,) + $(foreach file,$^,$(dyn_object)) + $(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ __dyn__.tmp $(DLIBS) -Wl,--output-def,$(DYN_DIR)/$(basename $@).def,--out-implib,$(IMP_FILE) +endef + +DY_RULE = $(create_dynlib) + include $(TOP)$(ROOT)config/rules.mk