2009-08-21 00:01 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* external/libhpdf/Makefile
  * contrib/hbhpdf/Makefile
    ! Fixed to skip them when using dos hosts (due to long filenames
      in libhpdf lib sources/headers)

  * external/libhpdf/Makefile
    + Enabled for watcom/dos and watcom/linux targets.

  * config/common/watcom.mk
  * config/rules.mk
    + Added CC_FLAGS variable similar to HB_FLAGS to aid
      moving flags to envvars and to reduce redundancy in rules.
    * The CC_RULE hack was a little bit modified accordingly
      for c-mode non-linux watcom. We're now a bit closer to
      be able to drop CC_RULE override.
    ! Adapted above change for watcom where now all (non-user)
      flags are moved to envvar when using dos shells.
This commit is contained in:
Viktor Szakats
2009-08-20 22:04:49 +00:00
parent 96b978b21c
commit e260a1aea7
5 changed files with 49 additions and 20 deletions

View File

@@ -17,6 +17,25 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-08-21 00:01 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* external/libhpdf/Makefile
* contrib/hbhpdf/Makefile
! Fixed to skip them when using dos hosts (due to long filenames
in libhpdf lib sources/headers)
* external/libhpdf/Makefile
+ Enabled for watcom/dos and watcom/linux targets.
* config/common/watcom.mk
* config/rules.mk
+ Added CC_FLAGS variable similar to HB_FLAGS to aid
moving flags to envvars and to reduce redundancy in rules.
* The CC_RULE hack was a little bit modified accordingly
for c-mode non-linux watcom. We're now a bit closer to
be able to drop CC_RULE override.
! Adapted above change for watcom where now all (non-user)
flags are moved to envvar when using dos shells.
2009-08-20 22:28 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* config/common/watcom.mk
! Yet another fix to prev moving dos shell specific

View File

@@ -12,13 +12,6 @@
# http://www.users.pjwstk.edu.pl/~jms/qnx/help/watcom/compiler-tools/wlib.html
# ---------------------------------------------------------------
ifeq ($(CC),wcc386)
ifneq ($(HB_HOST_ARCH),linux)
CPPFLAGS := $(subst /,\,$(CPPFLAGS))
CC_RULE = $(CC) $(subst /,\,$(HB_INC_DEPEND)) $(CPPFLAGS) $(subst /,\,$(CFLAGS)) $(subst /,\,$(HB_CFLAGS)) $(subst /,\,$(HB_USER_CFLAGS)) $(CC_OUT)$(<F:.c=$(OBJ_EXT)) $(CC_IN)$(subst /,\,$<)
endif
endif
# NOTE: Hack to force no extension for Linux binaries created on non-Linux hosts.
# Otherwise they become '.elf'. [vszakats]
ifeq ($(HB_ARCHITECTURE),linux)
@@ -100,8 +93,20 @@ AR := wlib
ARFLAGS := -q -p=64 -c -n
AR_RULE = $(create_library)
ifeq ($(CC),wcc386)
ifneq ($(HB_HOST_ARCH),linux)
CC_RULE = $(CC) $(CC_FLAGS) $(subst /,\,$(HB_USER_CFLAGS)) $(CC_OUT)$(<F:.c=$(OBJ_EXT)) $(CC_IN)$(subst /,\,$<)
endif
endif
include $(TOP)$(ROOT)config/rules.mk
ifeq ($(CC),wcc386)
ifneq ($(HB_HOST_ARCH),linux)
CC_FLAGS := $(subst /,\,$(CC_FLAGS))
endif
endif
ifeq ($(HB_SHELL),dos)
# disable DOS/4GW Banner
@@ -109,11 +114,11 @@ ifeq ($(HB_SHELL),dos)
# work arround to DOS command line size limit
ifeq ($(CC),wcc386)
export WCC386 := $(strip $(CPPFLAGS))
export WCC386 := $(strip $(CC_FLAGS))
else
export WPP386 := $(strip $(CPPFLAGS))
export WPP386 := $(strip $(CC_FLAGS))
endif
CPPFLAGS :=
CC_FLAGS :=
export HARBOURCMD := $(HB_FLAGS)
HB_FLAGS :=

View File

@@ -27,16 +27,18 @@ HB_RULE = $(HB) $? $(HB_FLAGS) $(HB_USER_PRGFLAGS)
# Use default rules if architecture/compiler specific rule is not defined
CC_FLAGS := $(HB_INC_DEPEND) $(CPPFLAGS) $(CFLAGS) $(HB_CFLAGS)
# The rule to compile a C source file.
ifeq ($(CC_RULE),)
CC_RULE = $(CC) $(HB_INC_DEPEND) $(CPPFLAGS) $(CFLAGS) $(HB_CFLAGS) $(HB_USER_CFLAGS) $(CC_OUT)$(<F:.c=$(OBJ_EXT)) $(CC_IN) $<
CC_RULE = $(CC) $(CC_FLAGS) $(HB_USER_CFLAGS) $(CC_OUT)$(<F:.c=$(OBJ_EXT)) $(CC_IN) $<
ifneq ($(HB_BUILD_DLL),no)
ifneq ($(HB_DYN_COPT),)
ifneq ($(LIBNAME),)
ifneq ($(filter $(LIBNAME),$(HB_DYN_LIBS)),)
define cc_comp_all
$(CC) $(HB_INC_DEPEND) $(CPPFLAGS) $(CFLAGS) $(HB_CFLAGS) $(HB_USER_CFLAGS) $(CC_OUT)$(<F:.c=$(OBJ_EXT)) $(CC_IN) $<
$(CC) $(HB_INC_DEPEND) $(CPPFLAGS) $(CFLAGS) $(HB_CFLAGS) $(HB_USER_CFLAGS) $(CC_OUT)$(<F:.c=_dyn$(OBJ_EXT)) $(HB_DYN_COPT) $(CC_IN) $<
$(CC) $(CC_FLAGS) $(HB_USER_CFLAGS) $(CC_OUT)$(<F:.c=$(OBJ_EXT)) $(CC_IN) $<
$(CC) $(CC_FLAGS) $(HB_USER_CFLAGS) $(CC_OUT)$(<F:.c=_dyn$(OBJ_EXT)) $(HB_DYN_COPT) $(CC_IN) $<
endef
CC_RULE = $(cc_comp_all)
endif
@@ -47,7 +49,7 @@ endif
# The rule to compile a C++ source file.
ifeq ($(CPP_RULE),)
CPP_RULE = $(CC) $(HB_INC_DEPEND) $(CPPFLAGS) $(CFLAGS) $(HB_CFLAGS) $(HB_USER_CFLAGS) $(CC_OUT)$(<F:.cpp=$(OBJ_EXT)) $(CC_IN) $<
CPP_RULE = $(CC) $(CC_FLAGS) $(HB_USER_CFLAGS) $(CC_OUT)$(<F:.cpp=$(OBJ_EXT)) $(CC_IN) $<
endif
# The rule to link an executable.

View File

@@ -9,8 +9,10 @@ include $(TOP)$(ROOT)config/global.mk
LIBNAME := hbhpdf
ifeq ($(HB_INC_LIBHARU),)
ifeq ($(HB_XBUILD),)
HB_INC_LIBHARU = /usr/include /usr/local/include $(TOP)$(ROOT)external/libhpdf
ifneq ($(HB_HOST_ARCH),dos)
ifeq ($(HB_XBUILD),)
HB_INC_LIBHARU = /usr/include /usr/local/include $(TOP)$(ROOT)external/libhpdf
endif
endif
endif

View File

@@ -14,7 +14,11 @@ LIBNAME := libhpdf
ifeq ($(HB_WITH_LIBHPDF),)
HB_WITH_LIBHPDF := yes
ifeq ($(HB_COMPILER),watcom)
ifeq ($(HB_ARCHITECTURE)-$(HB_COMPILER),win-watcom)
HB_WITH_LIBHPDF := no
endif
# NOTE: dos hosts can't build this lib due to long filename. [vszakats]
ifeq ($(HB_HOST_ARCH),dos)
HB_WITH_LIBHPDF := no
endif
ifeq ($(HB_COMPILER),pocc64)
@@ -27,9 +31,6 @@ ifeq ($(HB_WITH_LIBHPDF),)
HB_WITH_LIBHPDF := yes
HB_CFLAGS += -U__COREDLL__
endif
ifeq ($(HB_ARCHITECTURE),os2)
HB_WITH_LIBHPDF := yes
endif
endif
ifeq ($(HB_WITH_LIBHPDF),yes)