freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] int-not32-changes-2017 c14d95e 02/23: watcom16.h, watcom16.m


From: suzuki toshiya
Subject: [freetype2] int-not32-changes-2017 c14d95e 02/23: watcom16.h, watcom16.mk: Watcom 16bit C compiler support files.
Date: Tue, 12 Sep 2017 22:13:33 -0400 (EDT)

branch: int-not32-changes-2017
commit c14d95e8839382696dab292b7d887e7b2bd618d3
Author: suzuki toshiya <address@hidden>
Commit: suzuki toshiya <address@hidden>

    watcom16.h, watcom16.mk: Watcom 16bit C compiler support files.
    unix-watcom16.mk: cross build by Watcom C compiler on Linux.
---
 builds/compiler/watcom16.h   | 10 ++++++
 builds/compiler/watcom16.mk  | 83 ++++++++++++++++++++++++++++++++++++++++++++
 builds/freetype.mk           | 24 +++++++++----
 builds/unix/detect.mk        | 43 ++++++++++++++---------
 builds/unix/unix-watcom16.mk | 24 +++++++++++++
 5 files changed, 160 insertions(+), 24 deletions(-)

diff --git a/builds/compiler/watcom16.h b/builds/compiler/watcom16.h
new file mode 100644
index 0000000..de550bd
--- /dev/null
+++ b/builds/compiler/watcom16.h
@@ -0,0 +1,10 @@
+#include "16bit.h"
+
+/*
+ * Watcom C compiler for 16bit cannot parse a command line option
+ * to set preprocessor macro with a value including a dot.
+ * it is misunderstood as a filename.
+ */
+#define FT_CONFIG_MODULES_H     "ftmodule.h"
+
+#undef TT_CONFIG_OPTION_GX_VAR_SUPPORT
diff --git a/builds/compiler/watcom16.mk b/builds/compiler/watcom16.mk
new file mode 100644
index 0000000..e49d539
--- /dev/null
+++ b/builds/compiler/watcom16.mk
@@ -0,0 +1,83 @@
+#
+# FreeType 2 Watcom-specific definitions
+#
+
+
+# Copyright 1996-2017 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# This file is part of the FreeType project, and may only be used, modified,
+# and distributed under the terms of the FreeType project license,
+# LICENSE.TXT.  By continuing to use, modify, or distribute this file you
+# indicate that you have read the license and understand and accept it
+# fully.
+
+
+# Compiler command line name
+#
+CC           := wcc
+COMPILER_SEP := $(SEP)
+_cc_opt_gcc_incompat   := yes
+_no_cpp_opt_ftmodule_h := yes
+
+
+# The object file extension (for standard and static libraries).  This can be
+# .o, .tco, .obj, etc., depending on the platform.
+#
+O  := obj
+SO := obj
+
+
+# The library file extension (for standard and static libraries).  This can
+# be .a, .lib, etc., depending on the platform.
+#
+A  := lib
+SA := lib
+
+
+# Path inclusion flag.  Some compilers use a different flag than `-I' to
+# specify an additional include path.  Examples are `/i=' or `-J'.
+#
+I := -i=
+
+
+# C flag used to define a macro before the compilation of a given source
+# object.  Usually it is `-D' like in `-DDEBUG'.
+#
+D := -d
+
+
+# The link flag used to specify a given library file on link.  Note that
+# this is only used to compile the demo programs, not the library itself.
+#
+L := -l
+
+
+# Target flag.
+#
+T := -fo=
+
+
+# C flags
+#
+#   These should concern: debug output, optimization & warnings.
+#
+#   Use the ANSIFLAGS variable to define the compiler flags used to enfore
+#   ANSI compliance.
+#
+CFLAGS ?= -zq -i=$(TOP_DIR)/builds/compiler 
-fi=$(TOP_DIR)/builds/compiler/watcom16.h
+
+# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
+#
+ANSIFLAGS := -za
+
+
+# Library linking
+#
+CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
+LINK_LIBRARY   = $(subst /,$(COMPILER_SEP), \
+                   wlib -q -n $@; \
+                   $(foreach m, $(OBJECTS_LIST), wlib -q $@ +$(m);) \
+                   echo > nul)
+
+# EOF
diff --git a/builds/freetype.mk b/builds/freetype.mk
index f8cfd41..4bd4b4f 100644
--- a/builds/freetype.mk
+++ b/builds/freetype.mk
@@ -126,12 +126,14 @@ INCLUDES := $(subst /,$(COMPILER_SEP),$(OBJ_DIR) \
 
 INCLUDE_FLAGS := $(INCLUDES:%=$I%)
 
-ifdef DEVEL_DIR
-  # We assume that all library dependencies for FreeType are fulfilled for a
-  # development build, so we directly access the necessary include directory
-  # information using `pkg-config'.
-  INCLUDE_FLAGS += $(shell pkg-config --cflags libpng \
-                                               harfbuzz )
+ifndef _cc_opt_gcc_incompat
+  ifdef DEVEL_DIR
+    # We assume that all library dependencies for FreeType are fulfilled for a
+    # development build, so we directly access the necessary include directory
+    # information using `pkg-config'.
+    INCLUDE_FLAGS += $(shell pkg-config --cflags libpng \
+                                                 harfbuzz )
+  endif
 endif
 
 
@@ -157,10 +159,18 @@ endif
 
 # `CPPFLAGS' might be specified by the user in the environment.
 #
+# some broken C compiler cannot parse "<ftmodule.h>" correctly.
+# they should declare _no_cpp_opt_ftmodule_h
+ifdef _no_cpp_opt_ftmodule_h
+  CPPFLAGS += $(I)$(TOP_DIR)/include/freetype/config
+else
+  FTOPTION_FTMODULE_H := $(D)FT_CONFIG_MODULE_H="<ftmodule.h>"
+endif
+
 FT_CFLAGS  = $(CPPFLAGS) \
              $(CFLAGS) \
              $DFT2_BUILD_LIBRARY \
-             $DFT_CONFIG_MODULES_H="<ftmodule.h>" \
+             $(FTOPTION_FTMODULE_H) \
              $(FTOPTION_FLAG)
 
 
diff --git a/builds/unix/detect.mk b/builds/unix/detect.mk
index a2cf0a7..c8bf093 100644
--- a/builds/unix/detect.mk
+++ b/builds/unix/detect.mk
@@ -54,23 +54,32 @@ ifeq ($(PLATFORM),unix)
       .PHONY: lcc
     else
 
-      # If a Unix platform is detected, the configure script is called and
-      # `unix-def.mk' together with `unix-cc.mk' is created.
-      #
-      # Arguments to `configure' should be in the CFG variable.  Example:
-      #
-      #   make CFG="--prefix=/usr --disable-static"
-      #
-      # If you need to set CFLAGS or LDFLAGS, do it here also.
-      #
-      # Feel free to add support for other platform specific compilers in
-      # this directory (e.g. solaris.mk + changes here to detect the
-      # platform).
-      #
-      CONFIG_FILE := unix.mk
-      unix: setup
-      must_configure := 1
-      .PHONY: unix
+      ifneq ($(findstring unix-watcom16,$(MAKECMDGOALS)),)
+        CONFIG_FILE := unix-watcom16.mk
+        CC          := wcc
+        unix-watcom16: setup
+        .PHONY: unix-watcom16
+
+      else
+
+        # If a Unix platform is detected, the configure script is called and
+        # `unix-def.mk' together with `unix-cc.mk' is created.
+        #
+        # Arguments to `configure' should be in the CFG variable.  Example:
+        #
+        #   make CFG="--prefix=/usr --disable-static"
+        #
+        # If you need to set CFLAGS or LDFLAGS, do it here also.
+        #
+        # Feel free to add support for other platform specific compilers in
+        # this directory (e.g. solaris.mk + changes here to detect the
+        # platform).
+        #
+        CONFIG_FILE := unix.mk
+        unix: setup
+        must_configure := 1
+        .PHONY: unix
+      endif
     endif
   endif
 
diff --git a/builds/unix/unix-watcom16.mk b/builds/unix/unix-watcom16.mk
new file mode 100644
index 0000000..bca4e0e
--- /dev/null
+++ b/builds/unix/unix-watcom16.mk
@@ -0,0 +1,24 @@
+#
+# FreeType 2 Configuration rules for Unix + Bruce CC for ELKS
+#
+#   Development version without optimizations & libtool
+#   and no installation.
+#
+
+
+# Copyright 1996-2017 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# This file is part of the FreeType project, and may only be used, modified,
+# and distributed under the terms of the FreeType project license,
+# LICENSE.TXT.  By continuing to use, modify, or distribute this file you
+# indicate that you have read the license and understand and accept it
+# fully.
+
+
+include $(TOP_DIR)/builds/unix/unixddef.mk
+include $(TOP_DIR)/builds/compiler/watcom16.mk
+include $(TOP_DIR)/builds/link_std.mk
+
+
+# EOF



reply via email to

[Prev in Thread] Current Thread [Next in Thread]