mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 10:07:54 +02:00
+ added makefiles for ihx2tzx
git-svn-id: branches/z80@44857 -
This commit is contained in:
parent
e72a5314eb
commit
f8d69601f2
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -19077,6 +19077,9 @@ utils/h2pas/scan.pas svneol=native#text/plain
|
||||
utils/h2pas/testit.h -text
|
||||
utils/h2pas/yylex.cod svneol=native#text/plain
|
||||
utils/h2pas/yyparse.cod svneol=native#text/plain
|
||||
utils/ihx2tzx/Makefile svneol=native#text/plain
|
||||
utils/ihx2tzx/Makefile.fpc svneol=native#text/plain
|
||||
utils/ihx2tzx/fpmake.pp svneol=native#text/plain
|
||||
utils/ihx2tzx/ihx2tzx.lpi svneol=native#text/plain
|
||||
utils/ihx2tzx/ihx2tzx.lpr svneol=native#text/plain
|
||||
utils/ihx2tzx/ihxreader.pas svneol=native#text/plain
|
||||
|
@ -18,3 +18,4 @@
|
||||
add_tply(ADirectory+IncludeTrailingPathDelimiter('tply'));
|
||||
add_unicode(ADirectory+IncludeTrailingPathDelimiter('unicode'));
|
||||
add_pas2js(ADirectory+IncludeTrailingPathDelimiter('pas2js'));
|
||||
add_ihx2tzx(ADirectory+IncludeTrailingPathDelimiter('ihx2tzx'));
|
||||
|
@ -38,3 +38,5 @@
|
||||
|
||||
{$include pas2js/fpmake.pp}
|
||||
|
||||
{$include ihx2tzx/fpmake.pp}
|
||||
|
||||
|
2644
utils/ihx2tzx/Makefile
Normal file
2644
utils/ihx2tzx/Makefile
Normal file
File diff suppressed because it is too large
Load Diff
102
utils/ihx2tzx/Makefile.fpc
Normal file
102
utils/ihx2tzx/Makefile.fpc
Normal file
@ -0,0 +1,102 @@
|
||||
#
|
||||
# Makefile.fpc for running fpmake
|
||||
#
|
||||
|
||||
[package]
|
||||
name=ihx2tzx
|
||||
version=3.3.1
|
||||
|
||||
[require]
|
||||
packages=rtl fpmkunit
|
||||
|
||||
[install]
|
||||
fpcpackage=y
|
||||
|
||||
[default]
|
||||
fpcdir=../..
|
||||
|
||||
[prerules]
|
||||
FPMAKE_BIN_CLEAN=$(wildcard ./fpmake$(SRCEXEEXT))
|
||||
ifdef OS_TARGET
|
||||
FPC_TARGETOPT+=--os=$(OS_TARGET)
|
||||
endif
|
||||
ifdef CPU_TARGET
|
||||
FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
|
||||
endif
|
||||
LOCALFPMAKE=./fpmake$(SRCEXEEXT)
|
||||
|
||||
[rules]
|
||||
# Do not pass the Makefile's unit and binary target locations. Fpmake uses it's own.
|
||||
override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
|
||||
override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
|
||||
# Do not pass the package-unitdirectories. Fpmake adds those and this way they don't apear in the .fpm
|
||||
override FPCOPT:=$(filter-out $(addprefix -Fu,$(COMPILER_UNITDIR)),$(FPCOPT))# Compose general fpmake-parameters
|
||||
# Compose general fpmake-parameters
|
||||
ifdef FPMAKEOPT
|
||||
FPMAKE_OPT+=$(FPMAKEOPT)
|
||||
endif
|
||||
FPMAKE_OPT+=--localunitdir=../..
|
||||
FPMAKE_OPT+=--globalunitdir=../../packages
|
||||
FPMAKE_OPT+=$(FPC_TARGETOPT)
|
||||
FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
|
||||
FPMAKE_OPT+=--compiler=$(FPC)
|
||||
FPMAKE_OPT+=-bu
|
||||
.NOTPARALLEL:
|
||||
|
||||
fpmake$(SRCEXEEXT): fpmake.pp
|
||||
$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
|
||||
all: fpmake$(SRCEXEEXT)
|
||||
$(LOCALFPMAKE) compile $(FPMAKE_OPT)
|
||||
smart: fpmake$(SRCEXEEXT)
|
||||
$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
|
||||
release: fpmake$(SRCEXEEXT)
|
||||
$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
|
||||
debug: fpmake$(SRCEXEEXT)
|
||||
$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
|
||||
# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
|
||||
# most often fail because the dependencies are cleared.
|
||||
# In case of a clean, simply do nothing
|
||||
ifeq ($(FPMAKE_BIN_CLEAN),)
|
||||
clean:
|
||||
else
|
||||
clean:
|
||||
$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
|
||||
endif
|
||||
# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
|
||||
# when the package is compiled using fpcmake prior to running this clean using fpmake
|
||||
ifeq ($(FPMAKE_BIN_CLEAN),)
|
||||
distclean: $(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
|
||||
else
|
||||
distclean:
|
||||
ifdef inUnix
|
||||
{ $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi; }
|
||||
else
|
||||
$(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
|
||||
endif
|
||||
-$(DEL) $(LOCALFPMAKE)
|
||||
endif
|
||||
cleanall: distclean
|
||||
install: fpmake$(SRCEXEEXT)
|
||||
ifdef UNIXHier
|
||||
$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
|
||||
else
|
||||
$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --baseinstalldir=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
|
||||
endif
|
||||
# distinstall also installs the example-sources and omits the location of the source-
|
||||
# files from the fpunits.cfg files.
|
||||
distinstall: fpmake$(SRCEXEEXT)
|
||||
ifdef UNIXHier
|
||||
$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie -fsp 0
|
||||
else
|
||||
$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --baseinstalldir=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR) -ie -fsp 0
|
||||
endif
|
||||
zipinstall: fpmake$(SRCEXEEXT)
|
||||
$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
|
||||
zipdistinstall: fpmake$(SRCEXEEXT)
|
||||
$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie -fsp 0
|
||||
zipsourceinstall: fpmake$(SRCEXEEXT)
|
||||
ifdef UNIXHier
|
||||
$(LOCALFPMAKE) archive $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) --prefix=share/src/fpc-\$$\(PACKAGEVERSION\)/$(INSTALL_FPCSUBDIR)/\$$\(PACKAGEDIRECTORY\)
|
||||
else
|
||||
$(LOCALFPMAKE) archive $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) --prefix=source\\$(INSTALL_FPCSUBDIR)\\\$$\(PACKAGEDIRECTORY\)
|
||||
endif
|
54
utils/ihx2tzx/fpmake.pp
Normal file
54
utils/ihx2tzx/fpmake.pp
Normal file
@ -0,0 +1,54 @@
|
||||
{$ifndef ALLPACKAGES}
|
||||
{$mode objfpc}{$H+}
|
||||
program fpmake;
|
||||
|
||||
uses fpmkunit;
|
||||
{$endif ALLPACKAGES}
|
||||
|
||||
procedure add_ihx2tzx(const ADirectory: string);
|
||||
|
||||
Var
|
||||
P : TPackage;
|
||||
T : TTarget;
|
||||
|
||||
begin
|
||||
With Installer do
|
||||
begin
|
||||
P:=AddPackage('utils-ihx2tzx');
|
||||
P.ShortName:='ihx2tzx';
|
||||
P.OSes:=AllOSes-[embedded,msdos,win16,macos,palmos];
|
||||
if Defaults.CPU=jvm then
|
||||
P.OSes := P.OSes - [java,android];
|
||||
|
||||
P.Author := 'Nikolay Nikolov';
|
||||
P.License := 'GPL';
|
||||
P.HomepageURL := 'www.freepascal.org';
|
||||
P.Email := '';
|
||||
P.Description := 'A tool to convert Intel HEX Format files to ZX Spectrum tape files in the TZX format.';
|
||||
P.NeedLibC:= false;
|
||||
|
||||
P.Directory:=ADirectory;
|
||||
P.Version:='3.3.1';
|
||||
|
||||
P.Dependencies.Add('fcl-base');
|
||||
|
||||
T:=P.Targets.AddProgram('ihx2tzx.lpr');
|
||||
T.Dependencies.AddUnit('ihxreader');
|
||||
T.Dependencies.AddUnit('tzxwriter');
|
||||
T.Dependencies.AddUnit('zxbasic');
|
||||
P.Targets.AddUnit('ihxreader.pas').Install := false;
|
||||
P.Targets.AddUnit('tzxwriter.pas').Install := false;
|
||||
P.Targets.AddUnit('zxbasic.pas').Install := false;
|
||||
end;
|
||||
end;
|
||||
|
||||
{$ifndef ALLPACKAGES}
|
||||
begin
|
||||
add_ihx2tzx('');
|
||||
Installer.Run;
|
||||
end.
|
||||
{$endif ALLPACKAGES}
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user