diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 430719a328..2ccbd56f3e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,34 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-03-28 11:15 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * INSTALL + * config/rules.mk + + config/res.mk + * config/bin.mk + * config/wce/global.mk + * config/wce/mingwarm.mk + * config/wce/poccarm.mk + * config/wce/msvcarm.mk + * config/common/watcom.mk + * config/win/xcc.mk + * config/win/mingw.mk + * config/win/pocc.mk + * config/win/bcc.mk + * config/win/watcom.mk + * config/win/cygwin.mk + * config/win/global.mk + * config/win/msvc.mk + * config/os2/watcom.mk + * config/os2/gcc.mk + * config/os2/global.mk + + Added support to GNU Make system to compile and link resources + on win, wce and os2 platforms. + + * bin/postinst.bat + + Deleted requirements from local comment. These are + documented in INSTALL. + 2010-03-27 10:46 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbxbp/xbpgra.prg ! GraInitMaterix(...) => GraInitMatrix(...) diff --git a/harbour/INSTALL b/harbour/INSTALL index 2ecdcbafff..6d34bb49f8 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -563,6 +563,7 @@ HARBOUR - HB_USER_PRGFLAGS User Harbour compiler options - HB_USER_CFLAGS User C compiler options + - HB_USER_RESFLAGS User resource compiler options (on win, wce, os2) - HB_USER_LDFLAGS User linker options for executables - HB_USER_AFLAGS User linker options for libraries - HB_USER_DFLAGS User linker options for dynamic libraries diff --git a/harbour/bin/postinst.bat b/harbour/bin/postinst.bat index 4b26c41eed..b06987af3a 100644 --- a/harbour/bin/postinst.bat +++ b/harbour/bin/postinst.bat @@ -10,18 +10,6 @@ rem See COPYING for licensing terms. rem rem Script run after Harbour make install to finish install process rem (for Windows/DOS) -rem -rem Contains: install package creator script, which requires: -rem -rem - Info-ZIP zip.exe in PATH -rem or HB_DIR_ZIP envvar set to its dir with an ending backslash. -rem https://sourceforge.net/project/showfiles.php?group_id=118012 -rem - NullSoft Installer installed (NSIS) -rem https://sourceforge.net/project/showfiles.php?group_id=22049&package_id=15374 -rem (only for Windows builds) -rem - makensis.exe (part of NSIS) in PATH -rem or HB_DIR_NSIS envvar set to its dir with an ending backslash. -rem (only for Windows builds) rem --------------------------------------------------------------- if "%HB_BIN_INSTALL%" == "" echo ! HB_BIN_INSTALL needs to be set. diff --git a/harbour/config/bin.mk b/harbour/config/bin.mk index 92f4d4b408..2162709a8f 100644 --- a/harbour/config/bin.mk +++ b/harbour/config/bin.mk @@ -121,6 +121,7 @@ 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 := @@ -139,6 +140,9 @@ 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 diff --git a/harbour/config/common/watcom.mk b/harbour/config/common/watcom.mk index 6932efd750..38ca72e09f 100644 --- a/harbour/config/common/watcom.mk +++ b/harbour/config/common/watcom.mk @@ -24,9 +24,15 @@ AR := wlib ARFLAGS += -q -p=72 -c -n comma := , -LDFILES_COMMA = $(subst $(subst x,x, ),$(comma) ,$(^F)) +ifneq ($(RES_EXT),) + LDFILES_COMMA = $(subst $(subst x,x, ),$(comma) ,$(filter-out %$(RES_EXT),$(^F))) + LDRES_LIST = $(foreach file,$(filter %$(RES_EXT),$(^F)),OPT res=$(file)) +else + LDFILES_COMMA = $(subst $(subst x,x, ),$(comma) ,$(^F)) + LDRES_LIST := +endif LDLIBS_COMMA := $(subst $(subst x,x, ),$(comma) ,$(strip $(LDLIBS))) -LD_RULE = $(LD) $(LDFLAGS) $(HB_LDFLAGS) $(HB_USER_LDFLAGS) NAME $(BIN_DIR)/$@ FILE $(LDFILES_COMMA) $(if $(LDLIBS_COMMA), LIB $(LDLIBS_COMMA),) +LD_RULE = $(LD) $(LDFLAGS) $(HB_LDFLAGS) $(HB_USER_LDFLAGS) NAME $(BIN_DIR)/$@ FILE $(LDFILES_COMMA) $(LDRES_LIST) $(if $(LDLIBS_COMMA), LIB $(LDLIBS_COMMA),) AR_RULE = $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) $(LIB_DIR)/$@ $(foreach file,$(^F),-+$(file)) ifeq ($(HB_SHELL),dos) diff --git a/harbour/config/os2/gcc.mk b/harbour/config/os2/gcc.mk index d87a708cef..85172ab695 100644 --- a/harbour/config/os2/gcc.mk +++ b/harbour/config/os2/gcc.mk @@ -39,6 +39,14 @@ ifeq ($(HB_BUILD_DEBUG),yes) CFLAGS += -g endif +RC := windres +RC_OUT := -o$(subst x,x, ) +ifeq ($(HB_COMPILER),gccomf) + RCFLAGS := -O omf +else + RCFLAGS := -O coff +endif + ifneq ($(filter $(HB_BUILD_STRIP),all lib),) ifeq ($(HB_COMPILER),gccomf) ARSTRIP = & ${HB_CCPATH}${HB_CCPREFIX}stripomf -S $(LIB_DIR)/$@ diff --git a/harbour/config/os2/global.mk b/harbour/config/os2/global.mk index 3ec8a3aac4..88497eeebb 100644 --- a/harbour/config/os2/global.mk +++ b/harbour/config/os2/global.mk @@ -4,6 +4,7 @@ all : first +RES_EXT := .res BIN_EXT := .exe DYN_EXT := .dll diff --git a/harbour/config/os2/watcom.mk b/harbour/config/os2/watcom.mk index f663a9baf1..41aef3128b 100644 --- a/harbour/config/os2/watcom.mk +++ b/harbour/config/os2/watcom.mk @@ -57,6 +57,10 @@ ifeq ($(HB_BUILD_DEBUG),yes) CFLAGS += -d2 endif +RC := wrc +RC_OUT := -fo= +RCFLAGS := -q -r -zm -bt=os2 + LD := wlink ifeq ($(HB_BUILD_DEBUG),yes) LDFLAGS += DEBUG ALL diff --git a/harbour/config/res.mk b/harbour/config/res.mk new file mode 100644 index 0000000000..3213f3911a --- /dev/null +++ b/harbour/config/res.mk @@ -0,0 +1,5 @@ +# +# $Id$ +# + +ALL_RC_OBJS := $(RC_SOURCES:.rc=$(RES_EXT)) diff --git a/harbour/config/rules.mk b/harbour/config/rules.mk index 784c738de1..062d9a2be1 100644 --- a/harbour/config/rules.mk +++ b/harbour/config/rules.mk @@ -62,6 +62,13 @@ ifeq ($(CPP_RULE),) CPP_RULE = $(CXX) $(CC_FLAGS) $(HB_USER_CFLAGS) $(CC_OUT)$(