Initial import
git-svn-id: http://moon:8086/svn/software/trunk/libsrc/libtiff_2007@1 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
Executable
+72
@@ -0,0 +1,72 @@
|
||||
|
||||
(* You must manually set the top-level PATHNAME here; everything else is automatic *)
|
||||
|
||||
set PATHNAME to "ritter:tiff-v3.4beta028:"
|
||||
set PRINTING to "NO"
|
||||
|
||||
set MKG3STATES to PATHNAME & "mkg3states.mw"
|
||||
set LIBTIFF to PATHNAME & "libtiff-68K.mw"
|
||||
set TIFFINFO to PATHNAME & "tiffinfo.mw"
|
||||
|
||||
with timeout of 60000 seconds
|
||||
tell application "MW C/C++ 68K 1.2.2"
|
||||
|
||||
activate
|
||||
|
||||
|
||||
(* Create tif_fax3sm.c file *)
|
||||
Create Project {file MKG3STATES}
|
||||
Add Files {"mkg3states.c", "mkg3_main.c", "getopt.c"}
|
||||
Add Files {"MacOS.lib"} To Segment 2
|
||||
Add Files {"ANSI (4i/8d) C.68K.Lib"} To Segment 3
|
||||
Add Files {"SIOUX.68K.Lib"} To Segment 4
|
||||
Add Files {"MathLib68K (4i/8d).Lib"} To Segment 5
|
||||
|
||||
Set Preferences To {Activate CPlusPlus:false, ARM Conformance:false, ANSI Keywords Only:false, Require Function Prototypes:false, Expand Trigraph Sequences:false, Enums Always Ints:false, MPW Pointer Type Rules:false, Prefix File:"mac_main.h"}
|
||||
Set Preferences To {Illegal Pragmas:false, Empty Declarations:false, Possible Errors:false, Unused Variables:false, Unused Arguments:false, Extra Commas:false, Extended Error Checking:false}
|
||||
Set Preferences To {Code Model:2, Struct Alignment:0, MC68020 CodeGen:false, MC68881 CodeGen:false, Four Bytes Ints:true, Eight Byte Double:true, Peephole Optimizer:true, CSE Optimizer:true, Optimize For Size:true, Far Data:true, Use Profiler:false, Far Virtual Function Tables:false, Far String Constants:true}
|
||||
Set Preferences To {MacsBug Symbols:2, Generate SYM File:false, Full Path In Sym Files:true, Generate Link Map:false, Generate A6 Stack Frames:true, The Debugger Aware:false, Link Single Segment:false, Fast Link:true}
|
||||
Set Preferences To {Project Type:0, File Name:"mkg3states", File Creator:"????", File Type:"APPL"}
|
||||
|
||||
Make Project
|
||||
Run Project
|
||||
Remove Binaries
|
||||
Close Project
|
||||
|
||||
|
||||
(* Create LIBTIFF *)
|
||||
Create Project {file LIBTIFF}
|
||||
Add Files {"tif_apple.c", "tif_aux.c", "tif_close.c", "tif_codec.c", "tif_compress.c", "tif_dumpmode.c", "tif_error.c", "tif_flush.c", "tif_lzw.c", "tif_next.c", "tif_open.c", "tif_packbits.c"}
|
||||
Add Files {"tif_fax3.c"} To Segment 2
|
||||
Add Files {"tif_dirinfo.c", "tif_dir.c", "tif_dirwrite.c", "tif_dirread.c"} To Segment 3
|
||||
Add Files {"tif_predict.c", "tif_print.c", "tif_read.c", "tif_strip.c", "tif_swab.c", "tif_thunder.c", "tif_tile.c", "tif_version.c", "tif_zip.c", "tif_jpeg.c", "tif_warning.c", "tif_write.c"} To Segment 4
|
||||
Add Files {"tif_fax3sm.c"} To Segment 5
|
||||
Add Files {"tif_getimage.c"} To Segment 6
|
||||
|
||||
Set Preferences To {Activate CPlusPlus:false, ARM Conformance:false, ANSI Keywords Only:false, Require Function Prototypes:false, Expand Trigraph Sequences:false, Enums Always Ints:false, MPW Pointer Type Rules:false, Prefix File:"MacHeaders68K"}
|
||||
Set Preferences To {Illegal Pragmas:false, Empty Declarations:false, Possible Errors:false, Unused Variables:false, Unused Arguments:false, Extra Commas:false, Extended Error Checking:false}
|
||||
Set Preferences To {Code Model:2, Struct Alignment:0, MC68020 CodeGen:false, MC68881 CodeGen:false, Four Bytes Ints:true, Eight Byte Double:true, Peephole Optimizer:true, CSE Optimizer:true, Optimize For Size:true, Far Data:true, Use Profiler:false, Far Virtual Function Tables:false, Far String Constants:true}
|
||||
Set Preferences To {MacsBug Symbols:2, Generate SYM File:true, Full Path In Sym Files:true, Generate Link Map:false, Generate A6 Stack Frames:true, The Debugger Aware:false, Link Single Segment:false, Fast Link:true}
|
||||
Set Preferences To {Project Type:2, File Name:"libtiff-68K", File Creator:"????", File Type:"APPL"}
|
||||
Make Project
|
||||
Close Project
|
||||
|
||||
Create Project {file TIFFINFO}
|
||||
Add Files {"tiffinfo.c", "mac_main.c", "getopt.c"}
|
||||
Add Files {"MacOS.lib"} To Segment 2
|
||||
Add Files {"ANSI (4i/8d) C.68K.Lib"} To Segment 3
|
||||
Add Files {"SIOUX.68K.Lib"} To Segment 4
|
||||
Add Files {"MathLib68K (4i/8d).Lib"} To Segment 5
|
||||
Add Files {"libtiff-68K"} To Segment 6
|
||||
|
||||
Set Preferences To {Activate CPlusPlus:false, ARM Conformance:false, ANSI Keywords Only:false, Require Function Prototypes:false, Expand Trigraph Sequences:false, Enums Always Ints:false, MPW Pointer Type Rules:false, Prefix File:"mac_main.h"}
|
||||
Set Preferences To {Illegal Pragmas:false, Empty Declarations:false, Possible Errors:false, Unused Variables:false, Unused Arguments:false, Extra Commas:false, Extended Error Checking:false}
|
||||
Set Preferences To {Code Model:2, Struct Alignment:0, MC68020 CodeGen:false, MC68881 CodeGen:false, Four Bytes Ints:true, Eight Byte Double:true, Peephole Optimizer:true, CSE Optimizer:true, Optimize For Size:true, Far Data:true, Use Profiler:false, Far Virtual Function Tables:false, Far String Constants:true}
|
||||
Set Preferences To {MacsBug Symbols:2, Generate SYM File:false, Full Path In Sym Files:true, Generate Link Map:false, Generate A6 Stack Frames:true, The Debugger Aware:false, Link Single Segment:false, Fast Link:true}
|
||||
Set Preferences To {Project Type:0, File Name:"tiffinfo", File Creator:"????", File Type:"APPL"}
|
||||
|
||||
Make Project
|
||||
Close Project
|
||||
|
||||
end tell
|
||||
end timeout
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* mac_main.c -- The REAL entry point which
|
||||
* calls the tools main code. For the tools
|
||||
* the symbol "main" has been #defined to "tool_main"
|
||||
* so that this entry point may be used to access
|
||||
* the user-input first.
|
||||
*/
|
||||
|
||||
#undef main
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
int argc;
|
||||
char **argv;
|
||||
|
||||
argc=ccommand(&argv);
|
||||
|
||||
return tool_main(argc,argv); // Call the tool "main()" routine
|
||||
}
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
* mac_main.h -- redefines main entry point
|
||||
*/
|
||||
|
||||
#ifndef _mac_main_h
|
||||
#define _mac_main_h
|
||||
|
||||
#undef main
|
||||
#define main tool_main
|
||||
|
||||
#endif /* _mac_main_h */
|
||||
|
||||
Executable
+84
@@ -0,0 +1,84 @@
|
||||
----------------------------------------------------
|
||||
Build instructions for LIBTIFF - CodeWarrior (6.1):
|
||||
----------------------------------------------------
|
||||
|
||||
Note: there is a bug in CW earlier than 6.1 which will generate
|
||||
16-bit offset link errors for any projects using libtiff; you must
|
||||
download the CodeWarrior 6.1 patch located at:
|
||||
|
||||
ftp://ftp.metrowerks.com/pub/updates/metro-patches-61.hqx
|
||||
|
||||
unpack the archive, insert the files and recompile the libraries
|
||||
using the AppleScript provided.
|
||||
|
||||
|
||||
1. Make sure that the directory containing these files is under
|
||||
the "contrib" directory of the tiff folder; otherwise, some
|
||||
access path preferences will need to be updated.
|
||||
|
||||
2. The instructions below are for the 68k platform build.
|
||||
A similar script can be put together for the PPC version,
|
||||
or you can just directly convert the projects. Be sure to
|
||||
use the native libraries as well. NOTE: if anyone cooks
|
||||
up an equivalent script for PPC, send it to me and I'll include
|
||||
it with the rest of the package.
|
||||
|
||||
3. Open the file Makefile.script with an AppleScript Editor
|
||||
and change the PATHNAME variable to point to your
|
||||
top-level TIFF directory
|
||||
|
||||
4. Run the Script. It will do the following things:
|
||||
|
||||
4a. Prompt you for the current location of the CodeWarrior 68K
|
||||
program.
|
||||
|
||||
4b. Create the source file "tif_fax3sm.c":
|
||||
|
||||
i) Build the project CW project mkg3states.cw. It will
|
||||
produce a small program called mkg3states. Only a
|
||||
68k version is provided, since you only have to run
|
||||
this code once, and it only takes a few seconds.
|
||||
|
||||
ii) Run the built mkg3states program:
|
||||
|
||||
The program will temporarily take over ALL of the CPU, so
|
||||
don't panic. After a few seconds it will produce a file called
|
||||
"tif_fax3sm.c".
|
||||
|
||||
4c. Build the library project libtiff-68K.mw, producing library
|
||||
called libtiff-68K.
|
||||
|
||||
4d. Build program project tiffinfo.mw; it will produce a
|
||||
program called tiffinfo, which can dump the tiff tags of
|
||||
a named file. Passing in no arguments will dump a help file
|
||||
for the program. It is unix-flavored, but hey, it works.
|
||||
|
||||
5 When the script finishes, you will have a usable libtiff-68K
|
||||
library, a passable "tiffinfo" program, and the projects used
|
||||
to build them. Note that to get tiffinfo to work I have put
|
||||
an include file in the project that redefines main(), and
|
||||
then have a mac_main.c program that calls ccommand() first
|
||||
and passes that to the actual main code. A real mac app,
|
||||
of course, would never use this stuff at all...
|
||||
|
||||
. The tiffinfo.mw project may be used as a template to build
|
||||
most of the other libtiff tools, or your own code. When
|
||||
modifying a copy of the project, you will most likely need
|
||||
to update the "Access Paths" directory if it is moved out of
|
||||
the contrib folder.
|
||||
|
||||
6. If you are going to create a project from scratch, be sure
|
||||
to set up the preferences with
|
||||
|
||||
4-byte ints
|
||||
8-byte doubles
|
||||
Far Code/Far Data
|
||||
Large Linking model
|
||||
|
||||
and everything should work fine. If the console-style error
|
||||
reports bother you, you can always override the error and
|
||||
warning mechanism with TIFFSetErrorHandler to do something
|
||||
more Mac-like.
|
||||
|
||||
Questions, comments to Niles Ritter (ndr@tazboy.jpl.nasa.gov).
|
||||
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* mkg3_main.c -- passes fake arguments into main
|
||||
*/
|
||||
|
||||
#undef main
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
static char *argv[4] = {
|
||||
"mkg3states", "-c", "const", "tif_fax3sm.c" };
|
||||
|
||||
return tool_main(4,argv); // Call the tool "main()" routine
|
||||
}
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
----------------------------------------------------
|
||||
Build instructions for LIBTIFF - CodeWarrior (6.1):
|
||||
----------------------------------------------------
|
||||
|
||||
In this directory you will find a Makefile.script Applescript
|
||||
file, which should be run in order to build the libtiff code
|
||||
using MetroWerks CodeWarrior.
|
||||
|
||||
Refer to the "metrowerks.note" instructions on building the
|
||||
library for 68k and PowerPC native code, as well as building
|
||||
some of the libtiff tools, which are rather unix-like, but
|
||||
at least give an example of how to link everything together.
|
||||
|
||||
Questions, comments, bug reports to Niles Ritter
|
||||
(ndr@tazboy.jpl.nasa.gov). Sam Leffler takes no responsibility
|
||||
for the viability of this stuff.
|
||||
|
||||
-Niles.
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#define VERSION \
|
||||
"LIBTIFF, Version 3.4beta028 \n"\
|
||||
"Copyright (c) 1988-1995 Sam Leffler\n"\
|
||||
"Copyright (c) 1991-1996 Silicon Graphics, Inc."
|
||||
Reference in New Issue
Block a user