diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c975596ef1..6482940e91 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,37 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-17 21:30 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * config/global.mk + * config/wce/mingwarm.mk + * config/win/mingw.mk + + Added logic to support linux wince cross-builds. + My goal was to implement make_gnu_xmingwce.sh functionality + inside make files. I've yet to install cegcc to my Linux, + so I didn't test it yet, but please do. It's experimental + yet and ATM the wce target can be enabled by pointing + HB_CCPATH to cegcc install dir. This may change in the future. + + In cross build scenarios the default HB_INSTALL_PREFIX is + now /usr/local/harbour-- + Somewhat replicating current .sh behaviour. Not exactly + because I wanted to stay with conventions found in other parts + of Harbour. With .sh the dir was: + /usr/local/arm-wince-mingwce-harbour + With new system it's: + /usr/local/harbour-wce-mingwarm + ; QUESTION: I'm not familiar with .spec files, but it looks there are + some redunant settings inside harbour-wce-spec. + F.e. HB_CONTRIBLIBS should be left to default and local + Makefiles should do the ground work of deciding whether + a given contrib needs to be built. + CC_HB_USER_PRGFLAGS also seems redundant now, although + there may still be some .sh logic which needs it. + 'make -i' seems dangerous option when creating a release + package. + + * make_gnu_xmingwce.sh + ! Typo in comment. + 2009-08-17 20:02 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * ChangeLog ; Added missing change to one the recent entries: diff --git a/harbour/config/global.mk b/harbour/config/global.mk index a4ea8679e6..0a16e4717e 100644 --- a/harbour/config/global.mk +++ b/harbour/config/global.mk @@ -537,11 +537,35 @@ ifeq ($(HB_COMPILER),) export HB_CCPREFIX else ifeq ($(HB_ARCHITECTURE),linux) - ifneq ($(call find_in_path,wpp386),) - HB_COMPILER := watcom + ifneq ($(strip $(wildcard $(HB_CCPATH)/arm-wince-mingw32ce-gcc$(HB_HOST_BIN_EXT)))),) + HB_COMPILER := mingwarm + HB_ARCHITECTURE := wce + HB_CCPREFIX := arm-wince-mingw32ce- + HB_CCPATH += / + export HB_TOOLS_PREF := hbce + export HB_XBUILD := wce + ifneq ($(HB_HOST_BUILD),all) + HB_HOST_BUILD := lib + endif else - ifneq ($(call find_in_path,gcc),) - HB_COMPILER := gcc + ifneq ($(strip $(wildcard $(HB_CCPATH)/arm-mingw32ce-gcc$(HB_HOST_BIN_EXT)))),) + HB_COMPILER := mingwarm + HB_ARCHITECTURE := wce + HB_CCPREFIX := arm-mingw32ce- + HB_CCPATH += / + export HB_TOOLS_PREF := hbce + export HB_XBUILD := wce + ifneq ($(HB_HOST_BUILD),all) + HB_HOST_BUILD := lib + endif + else + ifneq ($(call find_in_path,wpp386),) + HB_COMPILER := watcom + else + ifneq ($(call find_in_path,gcc),) + HB_COMPILER := gcc + endif + endif endif endif else @@ -862,6 +886,10 @@ else else # Stick to *nix customs. I don't like it, it needs admin. HB_INSTALL_PREFIX := /usr/local + # Add postfix for cross builds + ifneq ($(HB_HOST_ARCH),$(HB_ARCHITECTURE)) + HB_INSTALL_PREFIX += /harbour-$(HB_ARCHITECTURE)-$(HB_COMPILER) + endif endif endif endif diff --git a/harbour/config/wce/mingwarm.mk b/harbour/config/wce/mingwarm.mk index 6137ea62ae..e6a75a56e3 100644 --- a/harbour/config/wce/mingwarm.mk +++ b/harbour/config/wce/mingwarm.mk @@ -12,7 +12,7 @@ OBJ_EXT := .o LIB_PREF := lib LIB_EXT := .a -CC := $(HB_CCPREFIX)$(HB_CMP) +CC := $(HB_CCPATH)$(HB_CCPREFIX)$(HB_CMP) CC_IN := -c CC_OUT := -o @@ -34,7 +34,7 @@ ifeq ($(HB_BUILD_DEBUG),yes) CFLAGS += -g endif -LD := $(HB_CCPREFIX)$(HB_CMP) +LD := $(HB_CCPATH)$(HB_CCPREFIX)$(HB_CMP) LD_OUT := -o LIBPATHS := -L$(LIB_DIR) @@ -42,7 +42,7 @@ LDLIBS := $(foreach lib,$(LIBS) $(SYSLIBS),-l$(lib)) LDFLAGS += $(LIBPATHS) -AR := $(HB_CCPREFIX)ar +AR := $(HB_CCPATH)$(HB_CCPREFIX)ar ARFLAGS := AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) crs $(LIB_DIR)/$@ $(^F) || $(RM) $(subst /,$(DIRSEP),$(LIB_DIR)/$@) diff --git a/harbour/config/win/mingw.mk b/harbour/config/win/mingw.mk index 1572a02749..ddad4972b7 100644 --- a/harbour/config/win/mingw.mk +++ b/harbour/config/win/mingw.mk @@ -12,7 +12,7 @@ OBJ_EXT := .o LIB_PREF := lib LIB_EXT := .a -CC := $(HB_CCPREFIX)$(HB_CMP) +CC := $(HB_CCPATH)$(HB_CCPREFIX)$(HB_CMP) CC_IN := -c CC_OUT := -o @@ -36,7 +36,7 @@ ifeq ($(HB_BUILD_DEBUG),yes) CFLAGS += -g endif -LD := $(HB_CCPREFIX)$(HB_CMP) +LD := $(HB_CCPATH)$(HB_CCPREFIX)$(HB_CMP) LD_OUT := -o LIBPATHS := -L$(LIB_DIR) @@ -51,7 +51,7 @@ endif LDFLAGS += $(LIBPATHS) -AR := $(HB_CCPREFIX)ar +AR := $(HB_CCPATH)$(HB_CCPREFIX)ar ARFLAGS := AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) crs $(LIB_DIR)/$@ $(^F) || $(RM) $(subst /,$(DIRSEP),$(LIB_DIR)/$@) diff --git a/harbour/make_gnu_xmingwce.sh b/harbour/make_gnu_xmingwce.sh index 3324880fe6..205ae5bb5b 100755 --- a/harbour/make_gnu_xmingwce.sh +++ b/harbour/make_gnu_xmingwce.sh @@ -36,7 +36,7 @@ fi [ -n "$HB_INSTALL_PREFIX" ] || \ export HB_INSTALL_PREFIX="/usr/local/arm-wince-mingwce-harbour" -# default mingwce instalation path +# default mingwce installation path [ -z "$HB_CCPATH" ] && HB_CCPATH="/opt/mingw32ce/bin" # mingwce executables prefix - this