[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Devel] Freetype 2.1.2 on OpenVMS
From: |
zinser |
Subject: |
[Devel] Freetype 2.1.2 on OpenVMS |
Date: |
Wed, 6 Nov 2002 04:19:33 +0100 |
address@hidden address@hidden
Hello,
I've build the latest Freetype version 2.1.2 with Compaq C V6.5 on
OpenVMS Alpha V7.3. Both the build for the library and the demos went
smooth.
Still I do have something for the next release ;-) descrip.mms as found
in the main directories of freetype2 and the demos should be replaced with
the appended copies of vms_make.com. This does work similar to a configure
script on Unix (and will recreate the deleted descrip.mms files when executed
on OpenVMS). Currently the main improvement of this approach over the
descrip.mms is that it additionally to the "normal" static .olb form of the
library produces a shareable image (shared object, dynamic link library) on
OpenVMS Alpha. Further work on the build process is planned for future
versions of Freetype (e.g. remove descrip.mms from all directories and
create them all from one central script).
Greetings, Martin
$!---------------vms_make.com for Freetype2------------------------------------
$! make Freetype2 under OpenVMS
$!
$! In case of problems with the build you might want to contact me at
$! address@hidden(preferred) or address@hidden (Work)
$!
$!------------------------------------------------------------------------------
$!
$! Just some general constants
$!
$ true = 1
$ false = 0
$ Make = ""
$!
$! Setup variables holding "config" information
$!
$ name = "Freetype2"
$ mapfile = name + ".map"
$ optfile = name + ".opt"
$ ccopt = ""
$ lopts = ""
$!
$! Check for MMK/MMS
$!
$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS"
$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK"
$!
$! Which command parameters were given
$!
$ gosub check_opts
$!
$ gosub crea_mms
$ 'Make' /macro=(comp_flags="''ccopt'")
$ delete/nolog/noconf ccop.mms;*,descrip.fdl;*
$ purge/nolog descrip.mms
$!
$! Create option file
$!
$ open/write optf 'optfile'
$FLOOP:
$ file = f$search("[...]*.obj")
$ if (file .nes. "")
$ then
$ if f$locate("FT2DEMOS",file) .eqs. f$length(file) then write optf file
$ goto floop
$ endif
$ close optf
$!
$!
$! Alpha gets a shareable image
$!
$ If f$getsyi("HW_MODEL") .gt. 1024
$ Then
$ LINK_/NODEB/NOSHARE/NOEXE/MAP='mapfile'/full 'optfile'/opt
$ call anal_map_axp 'mapfile' _link.opt
$ LINK_/NODEB/SHARE=freetype2shr.exe 'optfile'/opt,_link.opt/opt
$ dele/noconf 'mapfile';*
$ endif
$!
$ exit
$!
$!------------------------------------------------------------------------------
$!
$! If MMS/MMK are available dump out the descrip.mms if required
$!
$CREA_MMS:
$ write sys$output "Creating descrip.mms..."
$ copy sys$input: descrip.mms
$ deck
#
# FreeType 2 build system -- top-level Makefile for OpenVMS
#
# Copyright 2001 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.
all :
define freetype [--.include.freetype]
define psaux [-.psaux]
define autohint [-.autohint]
define base [-.base]
define cache [-.cache]
define cff [-.cff]
define cid [-.cid]
define pcf [-.pcf]
define psnames [-.psnames]
define raster [-.raster]
define sfnt [-.sfnt]
define smooth [-.smooth]
define truetype [-.truetype]
define type1 [-.type1]
define winfonts [-.winfonts]
if f$search("lib.dir") .eqs. "" then create/directory [.lib]
set default [.builds.vms]
$(MMS)$(MMSQUALIFIERS)
set default [--.src.autohint]
$(MMS)$(MMSQUALIFIERS)
set default [-.base]
$(MMS)$(MMSQUALIFIERS)
set default [-.bdf]
$(MMS)$(MMSQUALIFIERS)
set default [-.cache]
$(MMS)$(MMSQUALIFIERS)
set default [-.cff]
$(MMS)$(MMSQUALIFIERS)
set default [-.cid]
$(MMS)$(MMSQUALIFIERS)
set default [-.pcf]
$(MMS)$(MMSQUALIFIERS)
set default [-.pfr]
$(MMS)$(MMSQUALIFIERS)
set default [-.psaux]
$(MMS)$(MMSQUALIFIERS)
set default [-.pshinter]
$(MMS)$(MMSQUALIFIERS)
set default [-.psnames]
$(MMS)$(MMSQUALIFIERS)
set default [-.raster]
$(MMS)$(MMSQUALIFIERS)
set default [-.sfnt]
$(MMS)$(MMSQUALIFIERS)
set default [-.smooth]
$(MMS)$(MMSQUALIFIERS)
set default [-.truetype]
$(MMS)$(MMSQUALIFIERS)
set default [-.type1]
$(MMS)$(MMSQUALIFIERS)
set default [-.type42]
$(MMS)$(MMSQUALIFIERS)
set default [-.winfonts]
$(MMS)$(MMSQUALIFIERS)
set default [--]
# EOF
$ eod
$ anal/rms/fdl descrip.mms
$ open/write mmsf ccop.mms
$ write mmsf "CFLAGS = ", ccopt
$ close mmsf
$ convert/fdl=descrip.fdl ccop.mms ccop.mms
$ copy ccop.mms,descrip.mms;-1 descrip.mms
$ return
$!------------------------------------------------------------------------------
$!
$! Check command line options and set symbols accordingly
$!
$ CHECK_OPTS:
$ i = 1
$ OPT_LOOP:
$ if i .lt. 9
$ then
$ cparm = f$edit(p'i',"upcase")
$ if cparm .eqs. "DEBUG"
$ then
$ ccopt = ccopt + "/noopt/deb"
$ lopts = lopts + "/deb"
$ endif
$! if cparm .eqs. "LINK" then linkonly = true
$ if f$locate("LOPTS",cparm) .lt. f$length(cparm)
$ then
$ start = f$locate("=",cparm) + 1
$ len = f$length(cparm) - start
$ lopts = lopts + f$extract(start,len,cparm)
$ endif
$ if f$locate("CCOPT",cparm) .lt. f$length(cparm)
$ then
$ start = f$locate("=",cparm) + 1
$ len = f$length(cparm) - start
$ ccopt = ccopt + f$extract(start,len,cparm)
$ endif
$ i = i + 1
$ goto opt_loop
$ endif
$ return
$!------------------------------------------------------------------------------
$!
$! Analyze Map for OpenVMS AXP
$!
$ ANAL_MAP_AXP: Subroutine
$ V = 'F$Verify(0)
$ SET SYMBOL/GENERAL/SCOPE=(NOLOCAL,NOGLOBAL)
$ SAY := "WRITE_ SYS$OUTPUT"
$
$ IF F$SEARCH("''P1'") .EQS. ""
$ THEN
$ SAY " ANAL_MAP_AXP: Error, no mapfile provided"
$ goto exit_aa
$ ENDIF
$ IF "''P2'" .EQS. ""
$ THEN
$ SAY " ANALYZE_MAP_AXP: Error, no output file provided"
$ goto exit_aa
$ ENDIF
$
$ LINK_TMP =
F$PARSE(P2,,,"DEVICE")+F$PARSE(P2,,,"DIRECTORY")+F$PARSE(P2,,,"NAME")+".TMP"
$
$ SAY " creating PSECT list in ''P2'"
$ OPEN_/READ IN 'P1'
$ OPEN_/WRITE OUT 'P2'
$ WRITE_ OUT "!"
$ WRITE_ OUT "! ### PSECT list extracted from ''P1'"
$ WRITE_ OUT "!"
$ LOOP_PSECT_SEARCH:
$ READ_/END=EOF_PSECT IN REC
$ if F$EXTRACT(0,5,REC) .nes. "$DATA" then goto LOOP_PSECT_SEARCH
$ LAST = ""
$ LOOP_PSECT:
$ READ_/END=EOF_PSECT IN REC
$ if F$EXTRACT(0,1,REC) .eqs. "$" .and. F$EXTRACT(0,5,REC) .nes. "$DATA"
then goto EOF_PSECT
$ if REC - "NOPIC,OVR,REL,GBL,NOSHR,NOEXE, WRT,NOVEC" .nes. REC
$ then
$ J = F$LOCATE(" ",REC)
$ S = F$EXTRACT(0,J,REC)
$ IF S .EQS. LAST THEN GOTO LOOP_PSECT
$ WRITE_ OUT "symbol_vector = (" + S + " = PSECT)"
$ P$_'S= 1
$ LAST = S
$ endif
$ GOTO LOOP_PSECT
$
$ EOF_PSECT:
$ CLOSE_ IN
$ CLOSE_ OUT
$!
$ OPEN_/READ IN 'P1'
$ OPEN_/APPEND OUT 'P2'
$ WRITE_ OUT "!"
$ WRITE_ OUT "! ### Global definition list extracted from ''P1'"
$ WRITE_ OUT "!"
$ LOOP_DATA_SEARCH:
$ READ_/END=EOF_DATA IN REC
$ if f$locate("NOPIC,OVR,REL,GBL,NOSHR,NOEXE",rec) .eq. f$length(rec) -
then goto LOOP_DATA_SEARCH
$ s = f$element(0," ",rec)
$! write_ out "symbol_vector = (" + s + " = DATA)"
$ p$_'s' =1
$ goto loop_data_search
$ EOF_DATA:
$ CLOSE_ IN
$ CLOSE_ OUT
$ SAY " appending list of UNIVERSAL procedures to ''P2'"
$ SEARCH_/NOHIGH/WINDOW=(0,0) 'P1' " R-"/OUT='LINK_TMP
$ OPEN_/READ IN 'LINK_TMP
$ OPEN_/APPEND OUT 'P2'
$ WRITE_ OUT "!"
$ WRITE_ OUT "! ### UNIVERSAL procedures and global definitions extracted from
''P1'"
$ WRITE_ OUT "!"
$ LOOP_UNIVERSAL:
$ READ_/END=EOF_UNIVERSAL IN REC
$ data = 0
$ J = F$LOCATE(" R-",REC)
$ S = F$EXTRACT(J+3,F$length(rec),REC)
$ IF (F$TYPE(P$_'S').EQS."").and.(data.ne.1)
$ THEN
$ WRITE_ OUT "symbol_vector = ("+S+" = PROCEDURE)"
$ ELSE
$ WRITE_ OUT "symbol_vector = ("+S+" = DATA)"
$ ENDIF
$ GOTO LOOP_UNIVERSAL
$ EOF_UNIVERSAL:
$ CLOSE_ IN
$ CLOSE_ OUT
$ if f$search("''LINK_TMP'") .nes. "" then DELETE_/NOLOG/NOCONFIRM
'LINK_TMP';*
$
$ EXIT_AA:
$ if V then set verify
$ endsubroutine
$!---------------vms_make.com for Freetype2 demos ------------------------------
$! make Freetype2 under OpenVMS
$!
$! In case of problems with the build you might want to contact me at
$! address@hidden(preferred) or address@hidden (Work)
$!
$!------------------------------------------------------------------------------
$!
$! Just some general constants
$!
$ Make = ""
$ true = 1
$ false = 0
$!
$! Setup variables holding "config" information
$!
$ name = "FT2demos"
$ optfile = name + ".opt"
$ ccopt = ""
$ lopts = ""
$!
$! Check for MMK/MMS
$!
$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS"
$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK"
$!
$! Which command parameters were given
$!
$ gosub check_opts
$!
$! Create option file
$!
$ open/write optf 'optfile'
$ If f$getsyi("HW_MODEL") .gt. 1024
$ Then
$ write optf "[-]freetype2shr.exe/share"
$ else
$ write optf "[-.lib]freetype.olb/lib"
$ endif
$ write optf "sys$share:decw$xlibshr.exe/share"
$ close optf
$!
$ gosub crea_mms
$ 'Make'
$ delete/nolog/noconf ccop.mms;*,descrip.fdl;*
$ purge/nolog descrip.mms
$!
$ exit
$!
$!------------------------------------------------------------------------------
$!
$! If MMS/MMK are available dump out the descrip.mms if required
$!
$CREA_MMS:
$ write sys$output "Creating descrip.mms..."
$ copy sys$input: descrip.mms
$ deck
# This file is part of the FreeType project.
#
# DESCRIP.MMS: Make file for OpenVMS using MMS or MMK
# Created by Martin P.J. Zinser
# (address@hidden (preferred) or address@hidden (work))
.FIRST
define freetype [-.include.freetype]
CC = cc
# location of src for Test programs
SRCDIR = [.src]
GRAPHSRC = [.graph]
GRX11SRC = [.graph.x11]
OBJDIR = [.obj]
# include paths
INCLUDES = /include=([-.include],[.graph])
GRAPHOBJ = $(OBJDIR)grblit.obj, \
$(OBJDIR)grobjs.obj, \
$(OBJDIR)grfont.obj, \
$(OBJDIR)grinit.obj, \
$(OBJDIR)grdevice.obj,\
$(OBJDIR)grx11.obj
# C flags
CFLAGS = $(CCOPT)$(INCLUDES)/obj=$(OBJDIR)
ALL : ftlint.exe ftmemchk.exe ftdump.exe testnames.exe \
ftview.exe ftmulti.exe ftstring.exe fttimer.exe
ftlint.exe : $(OBJDIR)ftlint.obj
link $(LOPTS) $(OBJDIR)ftlint.obj,[]ft2demos.opt/opt
ftmemchk.exe : $(OBJDIR)ftmemchk.obj
link $(LOPTS) $(OBJDIR)ftmemchk.obj,[]ft2demos.opt/opt
ftdump.exe : $(OBJDIR)ftdump.obj,$(OBJDIR)common.obj
link $(LOPTS) $(OBJDIR)ftdump.obj,common.obj,[]ft2demos.opt/opt
testnames.exe : $(OBJDIR)testnames.obj
link $(LOPTS) $(OBJDIR)testnames.obj,[]ft2demos.opt/opt
ftview.exe : $(OBJDIR)ftview.obj,$(OBJDIR)common.obj,$(GRAPHOBJ)
link $(LOPTS)
$(OBJDIR)ftview.obj,common.obj,$(GRAPHOBJ),[]ft2demos.opt/opt
ftmulti.exe : $(OBJDIR)ftmulti.obj,$(OBJDIR)common.obj,$(GRAPHOBJ)
link $(LOPTS)
$(OBJDIR)ftmulti.obj,common.obj,$(GRAPHOBJ),[]ft2demos.opt/opt
ftstring.exe : $(OBJDIR)ftstring.obj,$(OBJDIR)common.obj,$(GRAPHOBJ)
link $(LOPTS)
$(OBJDIR)ftstring.obj,common.obj,$(GRAPHOBJ),[]ft2demos.opt/opt
fttimer.exe : $(OBJDIR)fttimer.obj
link $(LOPTS) $(OBJDIR)fttimer.obj,[]ft2demos.opt/opt
$(OBJDIR)common.obj : $(SRCDIR)common.c , $(SRCDIR)common.h
$(OBJDIR)ftlint.obj : $(SRCDIR)ftlint.c
$(OBJDIR)ftmemchk.obj : $(SRCDIR)ftmemchk.c
$(OBJDIR)ftdump.obj : $(SRCDIR)ftdump.c
$(OBJDIR)testnames.obj : $(SRCDIR)testnames.c
$(OBJDIR)ftview.obj : $(SRCDIR)ftview.c
$(OBJDIR)grblit.obj : $(GRAPHSRC)grblit.c
$(OBJDIR)grobjs.obj : $(GRAPHSRC)grobjs.c
$(OBJDIR)grfont.obj : $(GRAPHSRC)grfont.c
$(OBJDIR)grinit.obj : $(GRAPHSRC)grinit.c
set def $(GRAPHSRC)
$(CC)$(CCOPT)/include=([.x11],[])/define=(DEVICE_X11)/obj=[-.obj]
grinit.c
set def [-]
$(OBJDIR)grx11.obj : $(GRX11SRC)grx11.c
set def $(GRX11SRC)
$(CC)$(CCOPT)/obj=[--.obj]/include=([-]) grx11.c
set def [--]
$(OBJDIR)grdevice.obj : $(GRAPHSRC)grdevice.c
$(OBJDIR)ftmulti.obj : $(SRCDIR)ftmulti.c
$(OBJDIR)ftstring.obj : $(SRCDIR)ftstring.c
$(OBJDIR)fttimer.obj : $(SRCDIR)fttimer.c
CLEAN :
delete $(OBJDIR)*.obj;*,[]ft2demos.opt;*
# EOF
$ eod
$ anal/rms/fdl descrip.mms
$ open/write mmsf ccop.mms
$ write mmsf "CCOPT = ", ccopt
$ write mmsf "LOPTS = ", lopts
$ close mmsf
$ convert/fdl=descrip.fdl ccop.mms ccop.mms
$ copy ccop.mms,descrip.mms;-1 descrip.mms
$ return
$!------------------------------------------------------------------------------
$!
$! Check commandline options and set symbols accordingly
$!
$ CHECK_OPTS:
$ i = 1
$ OPT_LOOP:
$ if i .lt. 9
$ then
$ cparm = f$edit(p'i',"upcase")
$ if cparm .eqs. "DEBUG"
$ then
$ ccopt = ccopt + "/noopt/deb"
$ lopts = lopts + "/deb"
$ endif
$! if cparm .eqs. "link $(LOPTS)" then link only = true
$ if f$locate("LOPTS",cparm) .lt. f$length(cparm)
$ then
$ start = f$locate("=",cparm) + 1
$ len = f$length(cparm) - start
$ lopts = lopts + f$extract(start,len,cparm)
$ endif
$ if f$locate("CCOPT",cparm) .lt. f$length(cparm)
$ then
$ start = f$locate("=",cparm) + 1
$ len = f$length(cparm) - start
$ ccopt = ccopt + f$extract(start,len,cparm)
$ endif
$ i = i + 1
$ goto opt_loop
$ endif
$ return
Dr. Martin P.J. Zinser Email: address@hidden
2512 Victor Avenue Phone: +1 312 523 6659
Glenview, IL, 60025 FAX: +1 312 408 3071
USA
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Devel] Freetype 2.1.2 on OpenVMS,
zinser <=