* new directory structur

git-svn-id: trunk@8933 -
This commit is contained in:
peter 2007-10-25 19:51:44 +00:00
parent c593606d6a
commit ea542d207e
31 changed files with 2549 additions and 462 deletions

51
.gitattributes vendored
View File

@ -4343,34 +4343,35 @@ packages/fpmkunit/fpmake.pp svneol=native#text/plain
packages/fpmkunit/src/fpmkunit.pp svneol=native#text/plain
packages/paszlib/Makefile svneol=native#text/plain
packages/paszlib/Makefile.fpc svneol=native#text/plain
packages/paszlib/adler.pas svneol=native#text/plain
packages/paszlib/changes.txt svneol=native#text/plain
packages/paszlib/demo/Makefile svneol=native#text/plain
packages/paszlib/demo/Makefile.fpc svneol=native#text/plain
packages/paszlib/demo/example.pas svneol=native#text/plain
packages/paszlib/demo/minigzip.pas svneol=native#text/plain
packages/paszlib/demo/miniunz.pas svneol=native#text/plain
packages/paszlib/demo/minizip.pas svneol=native#text/plain
packages/paszlib/fpmake.inc svneol=native#text/plain
packages/paszlib/fpmake.pp svneol=native#text/plain
packages/paszlib/gzio.pas svneol=native#text/plain
packages/paszlib/infblock.pas svneol=native#text/plain
packages/paszlib/infcodes.pas svneol=native#text/plain
packages/paszlib/inffast.pas svneol=native#text/plain
packages/paszlib/inftrees.pas svneol=native#text/plain
packages/paszlib/infutil.pas svneol=native#text/plain
packages/paszlib/paszlib.pas svneol=native#text/plain
packages/paszlib/readme.txt svneol=native#text/plain
packages/paszlib/trees.pas svneol=native#text/plain
packages/paszlib/unzip.pas svneol=native#text/plain
packages/paszlib/zbase.pas svneol=native#text/plain
packages/paszlib/zcompres.pas svneol=native#text/plain
packages/paszlib/zconf.inc svneol=native#text/plain
packages/paszlib/zdeflate.pas svneol=native#text/plain
packages/paszlib/zinflate.pas svneol=native#text/plain
packages/paszlib/zip.pas svneol=native#text/plain
packages/paszlib/ziputils.pas svneol=native#text/plain
packages/paszlib/zuncompr.pas svneol=native#text/plain
packages/paszlib/src/adler.pas svneol=native#text/plain
packages/paszlib/src/gzio.pas svneol=native#text/plain
packages/paszlib/src/infblock.pas svneol=native#text/plain
packages/paszlib/src/infcodes.pas svneol=native#text/plain
packages/paszlib/src/inffast.pas svneol=native#text/plain
packages/paszlib/src/inftrees.pas svneol=native#text/plain
packages/paszlib/src/infutil.pas svneol=native#text/plain
packages/paszlib/src/paszlib.pas svneol=native#text/plain
packages/paszlib/src/trees.pas svneol=native#text/plain
packages/paszlib/src/unzip.pas svneol=native#text/plain
packages/paszlib/src/zbase.pas svneol=native#text/plain
packages/paszlib/src/zcompres.pas svneol=native#text/plain
packages/paszlib/src/zconf.inc svneol=native#text/plain
packages/paszlib/src/zdeflate.pas svneol=native#text/plain
packages/paszlib/src/zinflate.pas svneol=native#text/plain
packages/paszlib/src/zip.pas svneol=native#text/plain
packages/paszlib/src/zipper.pp svneol=native#text/plain
packages/paszlib/src/ziputils.pas svneol=native#text/plain
packages/paszlib/src/zstream.pp svneol=native#text/plain
packages/paszlib/src/zuncompr.pas svneol=native#text/plain
packages/paszlib/tests/Makefile svneol=native#text/plain
packages/paszlib/tests/Makefile.fpc svneol=native#text/plain
packages/paszlib/tests/example.pas svneol=native#text/plain
packages/paszlib/tests/minigzip.pas svneol=native#text/plain
packages/paszlib/tests/miniunz.pas svneol=native#text/plain
packages/paszlib/tests/minizip.pas svneol=native#text/plain
rtl/COPYING -text
rtl/COPYING.FPC -text
rtl/Makefile svneol=native#text/plain

File diff suppressed because it is too large Load Diff

View File

@ -6,18 +6,22 @@
name=paszlib
version=2.2.0
[require]
packages=hash
#[require]
#packages=hash
[target]
units=paszlib adler gzio infblock infcodes inffast inftrees infutil trees zcompres zdeflate zinflate zbase zuncompr zip ziputils unzip
exampledirs=demo
units=paszlib zip unzip zipper
implicitunits=adler gzio infblock infcodes inffast inftrees infutil trees zcompres zdeflate zinflate zbase zuncompr ziputils zstream
exampledirs=tests
[install]
fpcpackage=y
[compiler]
sourcedir=src
[default]
fpcdir=../../..
fpcdir=../..
[rules]
.NOTPARALLEL:

View File

@ -1,12 +0,0 @@
Changes to the last version of PASZLIB (http://www.tu-chemnitz.de/~nomssi)
required for FPC-pascal:
(Standard adding of @ for assignment of procedure variables)
Zdeflate 532 and 536 added an @
zinflate 259 263 294 added an @
Warning only:
inflatetrees inflate_tree_fixed has two uint parameters in the interface, and
two uintf's in the implementation. Only a warning is issued btw, so
this is not critical.

View File

@ -6,8 +6,12 @@
{$ENDIF}
Version:={$i %FPCVERSION%};
T:=Targets.AddUnit('paszlib');
T:=Targets.AddUnit('zip');
T:=Targets.AddUnit('unzip');
T:=Targets.AddUnit('ziputils');
T:=Targets.AddUnit('zipper');
T:=Targets.AddUnit('zstream');
T:=Targets.AddUnit('adler');
T:=Targets.AddUnit('crc');
T:=Targets.AddUnit('gzio');
T:=Targets.AddUnit('infblock');
T:=Targets.AddUnit('infcodes');

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,440 @@
{
This file is part of the Free Pascal run time library.
Copyright (c) 1999-2000 by the Free Pascal development team
Implementation of compression streams.
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
{$mode objfpc}
unit zstream;
{ ---------------------------------------------------------------------
For linux and freebsd it's also possible to use ZLib instead
of paszlib. You need to undefine 'usepaszlib'.
---------------------------------------------------------------------}
{$define usepaszlib}
interface
uses
Sysutils, Classes
{$ifdef usepaszlib}
,paszlib,zbase
{$else}
,zlib
{$endif}
;
{$H+}
type
// Error reporting.
EZlibError = class(EStreamError);
ECompressionError = class(EZlibError);
EDecompressionError = class(EZlibError);
TCustomZlibStream = class(TOwnerStream)
private
FStrmPos: Integer;
FOnProgress: TNotifyEvent;
FZRec: TZStream;
FBuffer: array [Word] of Byte;
protected
procedure Progress(Sender: TObject); dynamic;
property OnProgress: TNotifyEvent read FOnProgress write FOnProgress;
public
constructor Create(Strm: TStream);
end;
TCompressionLevel = (clNone, clFastest, clDefault, clMax);
TCompressionStream = class(TCustomZlibStream)
private
function GetCompressionRate: extended;
function CompressionCheck(code: Integer): Integer;
procedure CompressBuf(const InBuf: Pointer; InBytes: Integer;
var OutBuf: Pointer; var OutBytes: Integer);
public
constructor Create(CompressionLevel: TCompressionLevel; Dest: TStream; ASkipHeader : Boolean = False);
destructor Destroy; override;
function Read(var Buffer; Count: Longint): Longint; override;
function Write(const Buffer; Count: Longint): Longint; override;
function Seek(Offset: Longint; Origin: Word): Longint; override;
property CompressionRate: extended read GetCompressionRate;
property OnProgress;
end;
TDecompressionStream = class(TCustomZlibStream)
private
function DecompressionCheck(code: Integer): Integer;
procedure DecompressBuf(const InBuf: Pointer; InBytes: Integer;
OutEstimate: Integer; var OutBuf: Pointer; var OutBytes: Integer);
public
constructor Create(ASource: TStream; ASkipHeader : Boolean = False);
destructor Destroy; override;
function Read(var Buffer; Count: Longint): Longint; override;
function Write(const Buffer; Count: Longint): Longint; override;
function Seek(Offset: Longint; Origin: Word): Longint; override;
property OnProgress;
end;
TGZOpenMode = (gzOpenRead,gzOpenWrite);
TGZFileStream = Class(TStream)
Private
FOpenMode : TGZOpenmode;
FFIle : gzfile;
Public
Constructor Create(FileName: String;FileMode: TGZOpenMode);
Destructor Destroy;override;
Function Read(Var Buffer; Count : longint): longint;override;
function Write(const Buffer; Count: Longint): Longint; override;
function Seek(Offset: Longint; Origin: Word): Longint; override;
end;
implementation
Const
ErrorStrings : array [0..6] of string =
('Unknown error %d','Z_ERRNO','Z_STREAM_ERROR',
'Z_DATA_ERROR','Z_MEM_ERROR','Z_BUF_ERROR','Z_VERSION_ERROR');
SCouldntOpenFile = 'Couldn''t open file : %s';
SReadOnlyStream = 'Decompression streams are read-only';
SWriteOnlyStream = 'Compression streams are write-only';
SSeekError = 'Compression stream seek error';
SInvalidSeek = 'Invalid Compression seek operation';
procedure TCompressionStream.CompressBuf(const InBuf: Pointer; InBytes: Integer;
var OutBuf: Pointer; var OutBytes: Integer);
var
strm: TZStream;
P: Pointer;
begin
FillChar(strm, sizeof(strm), 0);
OutBytes := ((InBytes + (InBytes div 10) + 12) + 255) and not 255;
OutBuf:=GetMem(OutBytes);
try
strm.next_in := InBuf;
strm.avail_in := InBytes;
strm.next_out := OutBuf;
strm.avail_out := OutBytes;
CompressionCheck(deflateInit(strm, Z_BEST_COMPRESSION));
try
while CompressionCheck(deflate(strm, Z_FINISH)) <> Z_STREAM_END do
begin
P := OutBuf;
Inc(OutBytes, 256);
ReallocMem(OutBuf,OutBytes);
strm.next_out := PByte(Integer(OutBuf) + (Integer(strm.next_out) - Integer(P)));
strm.avail_out := 256;
end;
finally
CompressionCheck(deflateEnd(strm));
end;
ReallocMem(OutBuf,strm.total_out);
OutBytes := strm.total_out;
except
FreeMem(OutBuf);
raise;
end;
end;
procedure TDecompressionStream.DecompressBuf(const InBuf: Pointer; InBytes: Integer;
OutEstimate: Integer; var OutBuf: Pointer; var OutBytes: Integer);
var
strm: TZStream;
P: Pointer;
BufInc: Integer;
Type
PByte = ^Byte;
begin
FillChar(strm, sizeof(strm), 0);
BufInc := (InBytes + 255) and not 255;
if OutEstimate = 0 then
OutBytes := BufInc
else
OutBytes := OutEstimate;
OutBuf:=GetMem(OutBytes);
try
strm.next_in := InBuf;
strm.avail_in := InBytes;
strm.next_out := OutBuf;
strm.avail_out := OutBytes;
DecompressionCheck(inflateInit(strm));
try
while DecompressionCheck(inflate(strm, Z_FINISH)) <> Z_STREAM_END do
begin
P := OutBuf;
Inc(OutBytes, BufInc);
ReallocMem(OutBuf, OutBytes);
strm.next_out := PByte(Integer(OutBuf) + (Integer(strm.next_out) - Integer(P)));
strm.avail_out := BufInc;
end;
finally
DecompressionCheck(inflateEnd(strm));
end;
ReallocMem(OutBuf, strm.total_out);
OutBytes := strm.total_out;
except
FreeMem(OutBuf);
raise;
end;
end;
// TCustomZlibStream
constructor TCustomZLibStream.Create(Strm: TStream);
begin
inherited Create(Strm);
FStrmPos := Strm.Position;
end;
procedure TCustomZLibStream.Progress(Sender: TObject);
begin
if Assigned(FOnProgress) then FOnProgress(Sender);
end;
// TCompressionStream
constructor TCompressionStream.Create(CompressionLevel: TCompressionLevel;
Dest: TStream; ASkipHeader : Boolean = False);
const
Levels: array [TCompressionLevel] of ShortInt =
(Z_NO_COMPRESSION, Z_BEST_SPEED, Z_DEFAULT_COMPRESSION, Z_BEST_COMPRESSION);
begin
inherited Create(Dest);
FZRec.next_out := @FBuffer[0];
FZRec.avail_out := sizeof(FBuffer);
If ASkipHeader then
CompressionCheck(deflateInit2(FZRec, Levels[CompressionLevel],Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, 0))
else
CompressionCheck(deflateInit(FZRec, Levels[CompressionLevel]));
end;
destructor TCompressionStream.Destroy;
begin
FZRec.next_in := nil;
FZRec.avail_in := 0;
try
if Source.Position <> FStrmPos then Source.Position := FStrmPos;
while (CompressionCheck(deflate(FZRec, Z_FINISH)) <> Z_STREAM_END)
and (FZRec.avail_out = 0) do
begin
Source.WriteBuffer(FBuffer, sizeof(FBuffer));
FZRec.next_out := @FBuffer[0];
FZRec.avail_out := sizeof(FBuffer);
end;
if FZRec.avail_out < sizeof(FBuffer) then
Source.WriteBuffer(FBuffer, sizeof(FBuffer) - FZRec.avail_out);
finally
deflateEnd(FZRec);
end;
inherited Destroy;
end;
function TCompressionStream.CompressionCheck(code: Integer): Integer;
begin
Result := code;
if (code < 0) then
if code < -6 then
raise ECompressionError.CreateFmt(Errorstrings[0],[Code])
else
raise ECompressionError.Create(ErrorStrings[Abs(Code)]);
end;
function TCompressionStream.Read(var Buffer; Count: Longint): Longint;
begin
raise ECompressionError.Create('Invalid stream operation');
result:=0;
end;
function TCompressionStream.Write(const Buffer; Count: Longint): Longint;
begin
FZRec.next_in := @Buffer;
FZRec.avail_in := Count;
if Source.Position <> FStrmPos then Source.Position := FStrmPos;
while (FZRec.avail_in > 0) do
begin
CompressionCheck(deflate(FZRec, 0));
if FZRec.avail_out = 0 then
begin
Source.WriteBuffer(FBuffer, sizeof(FBuffer));
FZRec.next_out := @FBuffer[0];
FZRec.avail_out := sizeof(FBuffer);
FStrmPos := Source.Position;
Progress(Self);
end;
end;
Result := Count;
end;
function TCompressionStream.Seek(Offset: Longint; Origin: Word): Longint;
begin
if (Offset = 0) and (Origin = soFromCurrent) then
Result := FZRec.total_in
else
raise ECompressionError.Create(SInvalidSeek);
end;
function TCompressionStream.GetCompressionRate: extended;
begin
Result:=0.0;
{ With FZrec do
if total_in = 0 then
GetCompressionRate:=0.0
else
GetCompressionRate:=1.0E2*(1.0E0-(total_out/total_in));
}
end;
// TDecompressionStream
constructor TDecompressionStream.Create(ASource: TStream; ASkipHeader : Boolean = False);
begin
inherited Create(ASource);
FZRec.next_in := @FBuffer[0];
If ASkipHeader then
DeCompressionCheck(inflateInit2(FZRec,-MAX_WBITS))
else
DeCompressionCheck(inflateInit(FZRec));
end;
destructor TDecompressionStream.Destroy;
begin
if FZRec.avail_in <> 0 then
Source.Seek(-FZRec.avail_in, soFromCurrent);
inflateEnd(FZRec);
inherited Destroy;
end;
function TDecompressionStream.DecompressionCheck(code: Integer): Integer;
begin
Result := code;
If Code<0 then
if code < -6 then
raise EDecompressionError.CreateFmt(Errorstrings[0],[Code])
else
raise EDecompressionError.Create(ErrorStrings[Abs(Code)]);
end;
function TDecompressionStream.Read(var Buffer; Count: Longint): Longint;
begin
FZRec.next_out := @Buffer;
FZRec.avail_out := Count;
if Source.Position <> FStrmPos then Source.Position := FStrmPos;
while (FZRec.avail_out > 0) do
begin
if FZRec.avail_in = 0 then
begin
FZRec.avail_in := Source.Read(FBuffer, sizeof(FBuffer));
if FZRec.avail_in = 0 then
begin
Result := Count - FZRec.avail_out;
Exit;
end;
FZRec.next_in := @FBuffer[0];
FStrmPos := Source.Position;
Progress(Self);
end;
if DeCompressionCheck(inflate(FZRec, 0)) = Z_STREAM_END then
begin
Result := Count - FZRec.avail_out;
Exit;
end;
end;
Result := Count;
end;
function TDecompressionStream.Write(const Buffer; Count: Longint): Longint;
begin
raise EDecompressionError.Create('Invalid stream operation');
result:=0;
end;
function TDecompressionStream.Seek(Offset: Longint; Origin: Word): Longint;
var
I: Integer;
Buf: array [0..4095] of Char;
begin
if (Offset = 0) and (Origin = soFromBeginning) then
begin
DecompressionCheck(inflateReset(FZRec));
FZRec.next_in := @FBuffer[0];
FZRec.avail_in := 0;
Source.Position := 0;
FStrmPos := 0;
end
else if ( (Offset >= 0) and (Origin = soFromCurrent)) or
( ((Offset - FZRec.total_out) > 0) and (Origin = soFromBeginning)) then
begin
if Origin = soFromBeginning then Dec(Offset, FZRec.total_out);
if Offset > 0 then
begin
for I := 1 to Offset div sizeof(Buf) do
ReadBuffer(Buf, sizeof(Buf));
ReadBuffer(Buf, Offset mod sizeof(Buf));
end;
end
else
raise EDecompressionError.Create(SInvalidSeek);
Result := FZRec.total_out;
end;
// TGZFileStream
Constructor TGZFileStream.Create(FileName: String;FileMode: TGZOpenMode);
Const OpenStrings : array[TGZOpenMode] of pchar = ('rb','wb');
begin
FOpenMode:=FileMode;
FFile:=gzopen (PChar(FileName),Openstrings[FileMode]);
If FFile=Nil then
Raise ezlibError.CreateFmt (SCouldntOpenFIle,[FileName]);
end;
Destructor TGZFileStream.Destroy;
begin
gzclose(FFile);
Inherited Destroy;
end;
Function TGZFileStream.Read(Var Buffer; Count : longint): longint;
begin
If FOpenMode=gzOpenWrite then
Raise ezliberror.create(SWriteOnlyStream);
Result:=gzRead(FFile,@Buffer,Count);
end;
function TGZFileStream.Write(const Buffer; Count: Longint): Longint;
begin
If FOpenMode=gzOpenRead then
Raise EzlibError.Create(SReadonlyStream);
Result:=gzWrite(FFile,@Buffer,Count);
end;
function TGZFileStream.Seek(Offset: Longint; Origin: Word): Longint;
begin
Result:=gzseek(FFile,Offset,Origin);
If Result=-1 then
Raise eZlibError.Create(SSeekError);
end;
end.

View File

@ -1,11 +1,12 @@
#
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/08/22]
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/10/25]
#
default: all
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
BSDs = freebsd netbsd openbsd darwin
UNIXs = linux $(BSDs) solaris qnx
LIMIT83fs = go32v2 os2 emx watcom
OSNeedsComspecToRunBatch = go32v2 watcom
FORCE:
.PHONY: FORCE
override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
@ -56,6 +57,11 @@ else
SRCBATCHEXT=.bat
endif
endif
ifdef COMSPEC
ifneq ($(findstring $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),)
RUNBATCH=$(COMSPEC) /C
endif
endif
ifdef inUnix
PATHSEP=/
else
@ -92,7 +98,7 @@ endif
endif
export ECHO
endif
override DEFAULT_FPCDIR=../../../..
override DEFAULT_FPCDIR=../../..
ifndef FPC
ifdef PP
FPC=$(PP)
@ -102,7 +108,7 @@ ifndef FPC
FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
ifneq ($(FPCPROG),)
FPCPROG:=$(firstword $(FPCPROG))
FPC:=$(shell $(FPCPROG) -PB)
FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
ifneq ($(findstring Error,$(FPC)),)
override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
endif
@ -231,160 +237,160 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
endif
PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
ifeq ($(FULL_TARGET),i386-linux)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),i386-go32v2)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),i386-win32)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),i386-os2)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),i386-freebsd)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),i386-beos)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),i386-netbsd)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),i386-solaris)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),i386-qnx)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),i386-netware)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),i386-openbsd)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),i386-wdosx)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),i386-darwin)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),i386-emx)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),i386-watcom)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),i386-netwlibc)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),i386-wince)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),i386-embedded)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),i386-symbian)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),m68k-linux)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),m68k-freebsd)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),m68k-netbsd)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),m68k-amiga)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),m68k-atari)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),m68k-openbsd)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),m68k-palmos)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),m68k-embedded)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),powerpc-linux)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),powerpc-netbsd)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),powerpc-amiga)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),powerpc-macos)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),powerpc-darwin)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),powerpc-morphos)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),powerpc-embedded)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),sparc-linux)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),sparc-netbsd)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),sparc-solaris)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),sparc-embedded)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),x86_64-linux)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),x86_64-win64)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),x86_64-embedded)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),arm-linux)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),arm-palmos)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),arm-wince)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),arm-gba)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),arm-nds)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),arm-embedded)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),arm-symbian)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),powerpc64-linux)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),powerpc64-darwin)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
ifeq ($(FULL_TARGET),powerpc64-embedded)
override TARGET_PROGRAMS+=minigzip example minizip miniunz
override TARGET_PROGRAMS+=minigzip example minizip miniunz
endif
override INSTALL_FPCPACKAGE=y
ifdef REQUIRE_UNITSDIR
@ -1137,262 +1143,210 @@ endif
override REQUIRE_PACKAGES=rtl paszlib
ifeq ($(FULL_TARGET),i386-linux)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),i386-go32v2)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),i386-win32)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),i386-os2)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),i386-freebsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),i386-beos)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),i386-netbsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),i386-solaris)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),i386-qnx)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),i386-netware)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),i386-openbsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),i386-wdosx)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),i386-darwin)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),i386-emx)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),i386-watcom)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),i386-netwlibc)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),i386-wince)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),i386-embedded)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),i386-symbian)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),m68k-linux)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),m68k-freebsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),m68k-netbsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),m68k-amiga)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),m68k-atari)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),m68k-openbsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),m68k-palmos)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),m68k-embedded)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),powerpc-linux)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),powerpc-netbsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),powerpc-amiga)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),powerpc-macos)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),powerpc-darwin)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),powerpc-morphos)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),powerpc-embedded)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),sparc-linux)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),sparc-netbsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),sparc-solaris)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),sparc-embedded)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),x86_64-linux)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),x86_64-win64)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),x86_64-embedded)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),arm-linux)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),arm-palmos)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),arm-wince)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),arm-gba)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),arm-nds)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),arm-embedded)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),arm-symbian)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),powerpc64-linux)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),powerpc64-darwin)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifeq ($(FULL_TARGET),powerpc64-embedded)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
endif
ifdef REQUIRE_PACKAGES_RTL
@ -1421,32 +1375,6 @@ ifdef UNITDIR_RTL
override COMPILER_UNITDIR+=$(UNITDIR_RTL)
endif
endif
ifdef REQUIRE_PACKAGES_HASH
PACKAGEDIR_HASH:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /hash/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_HASH),)
ifneq ($(wildcard $(PACKAGEDIR_HASH)/units/$(TARGETSUFFIX)),)
UNITDIR_HASH=$(PACKAGEDIR_HASH)/units/$(TARGETSUFFIX)
else
UNITDIR_HASH=$(PACKAGEDIR_HASH)
endif
ifdef CHECKDEPEND
$(PACKAGEDIR_HASH)/$(FPCMADE):
$(MAKE) -C $(PACKAGEDIR_HASH) $(FPCMADE)
override ALLDEPENDENCIES+=$(PACKAGEDIR_HASH)/$(FPCMADE)
endif
else
PACKAGEDIR_HASH=
UNITDIR_HASH:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /hash/Package.fpc,$(UNITSDIR)))))
ifneq ($(UNITDIR_HASH),)
UNITDIR_HASH:=$(firstword $(UNITDIR_HASH))
else
UNITDIR_HASH=
endif
endif
ifdef UNITDIR_HASH
override COMPILER_UNITDIR+=$(UNITDIR_HASH)
endif
endif
ifdef REQUIRE_PACKAGES_PASZLIB
PACKAGEDIR_PASZLIB:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /paszlib/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_PASZLIB),)
@ -1487,7 +1415,7 @@ override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
endif
ifndef CROSSBOOTSTRAP
ifneq ($(BINUTILSPREFIX),)
override FPCOPT+=-XP$(BINUTILSPREFIX)
override FPCOPT+=-XP$(BINUTILSPREFIX)
endif
ifneq ($(BINUTILSPREFIX),)
override FPCOPT+=-Xr$(RLINKPATH)
@ -1619,9 +1547,13 @@ ifeq (,$(findstring -s ,$(COMPILER)))
EXECPPAS=
else
ifeq ($(FULL_SOURCE),$(FULL_TARGET))
ifdef RUNBATCH
EXECPPAS:=@$(RUNBATCH) $(PPAS)
else
EXECPPAS:=@$(PPAS)
endif
endif
endif
.PHONY: fpc_exes
ifndef CROSSINSTALL
ifneq ($(TARGET_PROGRAMS),)

View File

@ -3,7 +3,7 @@
#
[target]
programs=minigzip example minizip miniunz
programs=minigzip example minizip miniunz
[require]
packages=paszlib
@ -12,5 +12,5 @@ packages=paszlib
fpcpackage=y
[default]
fpcdir=../../../..
fpcdir=../../..