From 2d7f74e9ff05a4469a2e115eec4cb21aa9a63a76 Mon Sep 17 00:00:00 2001 From: Timothe Litt Date: Tue, 26 May 2015 17:42:36 -0400 Subject: [PATCH] Add Makefiles, fix some compile errors There are more compile errors, especially in the cross-assemblers. But I'm leaving those for someone else. --- Makefile | 33 ++++++++++++ config11/Makefile | 20 +++++++ converters/Makefile | 92 ++++++++++++++++++++++++++++++++ converters/asc/Makefile | 20 +++++++ converters/decsys/Makefile | 20 +++++++ converters/dtos8cvt/Makefile | 20 +++++++ converters/gt7cvt/Makefile | 20 +++++++ converters/hpconvert/Makefile | 20 +++++++ converters/indent/Makefile | 20 +++++++ converters/littcvt/Makefile | 20 +++++++ converters/m8376/Makefile | 20 +++++++ converters/mt2tpc/Makefile | 20 +++++++ converters/mtcvt23/Makefile | 20 +++++++ converters/mtcvtfix/Makefile | 20 +++++++ converters/mtcvtodd/Makefile | 20 +++++++ converters/noff/Makefile | 20 +++++++ converters/sfmtcvt/Makefile | 20 +++++++ converters/strrem/Makefile | 20 +++++++ converters/strsub/Makefile | 20 +++++++ converters/tar2mt/Makefile | 20 +++++++ converters/tp512cvt/Makefile | 20 +++++++ converters/tpc2mt/Makefile | 20 +++++++ crossassemblers/Makefile | 33 ++++++++++++ crossassemblers/hpasm/Makefile | 20 +++++++ crossassemblers/macro1/Makefile | 20 +++++++ crossassemblers/macro7/Makefile | 20 +++++++ crossassemblers/macro8x/Makefile | 20 +++++++ extracters/Makefile | 41 ++++++++++++++ extracters/ckabstape/Makefile | 20 +++++++ extracters/ckabstape/ckabstape.c | 38 +++++++------ extracters/mmdir/Makefile | 20 +++++++ extracters/mtdump/Makefile | 20 +++++++ extracters/mtdump/mtdump.c | 9 ++-- extracters/rawcopy/Makefile | 20 +++++++ extracters/rawcopy/RawCopy.c | 3 +- extracters/sdsdump/Makefile | 20 +++++++ extracters/tpdump/Makefile | 20 +++++++ extracters/tpdump/tpdump.c | 8 +-- 38 files changed, 831 insertions(+), 26 deletions(-) create mode 100644 Makefile create mode 100644 config11/Makefile create mode 100644 converters/Makefile create mode 100644 converters/asc/Makefile create mode 100644 converters/decsys/Makefile create mode 100644 converters/dtos8cvt/Makefile create mode 100644 converters/gt7cvt/Makefile create mode 100644 converters/hpconvert/Makefile create mode 100644 converters/indent/Makefile create mode 100644 converters/littcvt/Makefile create mode 100644 converters/m8376/Makefile create mode 100644 converters/mt2tpc/Makefile create mode 100644 converters/mtcvt23/Makefile create mode 100644 converters/mtcvtfix/Makefile create mode 100644 converters/mtcvtodd/Makefile create mode 100644 converters/noff/Makefile create mode 100644 converters/sfmtcvt/Makefile create mode 100644 converters/strrem/Makefile create mode 100644 converters/strsub/Makefile create mode 100644 converters/tar2mt/Makefile create mode 100644 converters/tp512cvt/Makefile create mode 100644 converters/tpc2mt/Makefile create mode 100644 crossassemblers/Makefile create mode 100644 crossassemblers/hpasm/Makefile create mode 100644 crossassemblers/macro1/Makefile create mode 100644 crossassemblers/macro7/Makefile create mode 100644 crossassemblers/macro8x/Makefile create mode 100644 extracters/Makefile create mode 100644 extracters/ckabstape/Makefile create mode 100644 extracters/mmdir/Makefile create mode 100644 extracters/mtdump/Makefile create mode 100644 extracters/rawcopy/Makefile create mode 100644 extracters/sdsdump/Makefile create mode 100644 extracters/tpdump/Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..fa4b0e2 --- /dev/null +++ b/Makefile @@ -0,0 +1,33 @@ +# all of these can be over-ridden on the "make" command line if they don't suit your environment. + +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +.PHONY: all clean install uninstall + +# Omitted: putr: has no sources. +all: + cd config11 && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd converters && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd crossassemblers && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd extracters && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + +clean: + cd config11 && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd converters && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd crossassemblers && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd extracters && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + +install: + cd config11 && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd converters && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd crossassemblers && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd extracters && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + +uninstall: + cd config11 && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd converters && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd crossassemblers && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd extracters && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall diff --git a/config11/Makefile b/config11/Makefile new file mode 100644 index 0000000..7a76d7d --- /dev/null +++ b/config11/Makefile @@ -0,0 +1,20 @@ +# all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=config11 +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/converters/Makefile b/converters/Makefile new file mode 100644 index 0000000..79af5d5 --- /dev/null +++ b/converters/Makefile @@ -0,0 +1,92 @@ +# all of these can be over-ridden on the "make" command line if they don't suit your environment. + +CFLAGS="-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow" +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +.PHONY: all clean install uninstall + +all: + cd asc && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd dtos8cvt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd hpconvert && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd littcvt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd mt2tpc && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd mtcvtfix && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd noff && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd strrem && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd tar2mt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd tpc2mt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd decsys && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd gt7cvt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd indent && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd m8376 && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd mtcvt23 && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd mtcvtodd && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd sfmtcvt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd strsub && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd tp512cvt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + +clean: + cd asc && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd dtos8cvt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd hpconvert && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd littcvt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd mt2tpc && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd mtcvtfix && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd noff && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd strrem && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd tar2mt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd tpc2mt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd decsys && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd gt7cvt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd indent && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd m8376 && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd mtcvt23 && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd mtcvtodd && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd sfmtcvt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd strsub && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd tp512cvt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + +install: + cd asc && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd dtos8cvt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd hpconvert && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd littcvt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd mt2tpc && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd mtcvtfix && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd noff && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd strrem && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd tar2mt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd tpc2mt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd decsys && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd gt7cvt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd indent && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd m8376 && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd mtcvt23 && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd mtcvtodd && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd sfmtcvt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd strsub && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd tp512cvt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + +uninstall: + cd asc && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd dtos8cvt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd hpconvert && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd littcvt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd mt2tpc && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd mtcvtfix && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd noff && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd strrem && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd tar2mt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd tpc2mt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd decsys && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd gt7cvt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd indent && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd m8376 && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd mtcvt23 && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd mtcvtodd && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd sfmtcvt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd strsub && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd tp512cvt && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall diff --git a/converters/asc/Makefile b/converters/asc/Makefile new file mode 100644 index 0000000..9c4db2a --- /dev/null +++ b/converters/asc/Makefile @@ -0,0 +1,20 @@ +# all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=asc +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/converters/decsys/Makefile b/converters/decsys/Makefile new file mode 100644 index 0000000..23b4aa1 --- /dev/null +++ b/converters/decsys/Makefile @@ -0,0 +1,20 @@ + # all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=decsys +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/converters/dtos8cvt/Makefile b/converters/dtos8cvt/Makefile new file mode 100644 index 0000000..13babe1 --- /dev/null +++ b/converters/dtos8cvt/Makefile @@ -0,0 +1,20 @@ + # all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=dtos8cvt +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/converters/gt7cvt/Makefile b/converters/gt7cvt/Makefile new file mode 100644 index 0000000..a5448f6 --- /dev/null +++ b/converters/gt7cvt/Makefile @@ -0,0 +1,20 @@ + # all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=gt7cvt +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/converters/hpconvert/Makefile b/converters/hpconvert/Makefile new file mode 100644 index 0000000..74a60c4 --- /dev/null +++ b/converters/hpconvert/Makefile @@ -0,0 +1,20 @@ + # all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=hpconvert +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/converters/indent/Makefile b/converters/indent/Makefile new file mode 100644 index 0000000..f28e685 --- /dev/null +++ b/converters/indent/Makefile @@ -0,0 +1,20 @@ + # all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=indent +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/converters/littcvt/Makefile b/converters/littcvt/Makefile new file mode 100644 index 0000000..672f2e1 --- /dev/null +++ b/converters/littcvt/Makefile @@ -0,0 +1,20 @@ + # all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=littcvt +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/converters/m8376/Makefile b/converters/m8376/Makefile new file mode 100644 index 0000000..fcb5e3c --- /dev/null +++ b/converters/m8376/Makefile @@ -0,0 +1,20 @@ + # all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=m8376 +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/converters/mt2tpc/Makefile b/converters/mt2tpc/Makefile new file mode 100644 index 0000000..9d974e3 --- /dev/null +++ b/converters/mt2tpc/Makefile @@ -0,0 +1,20 @@ + # all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=mt2tpc +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/converters/mtcvt23/Makefile b/converters/mtcvt23/Makefile new file mode 100644 index 0000000..b933cf7 --- /dev/null +++ b/converters/mtcvt23/Makefile @@ -0,0 +1,20 @@ + # all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=mtcvtv23 +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/converters/mtcvtfix/Makefile b/converters/mtcvtfix/Makefile new file mode 100644 index 0000000..1ff995e --- /dev/null +++ b/converters/mtcvtfix/Makefile @@ -0,0 +1,20 @@ + # all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=mtcvtfix +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/converters/mtcvtodd/Makefile b/converters/mtcvtodd/Makefile new file mode 100644 index 0000000..2f110fb --- /dev/null +++ b/converters/mtcvtodd/Makefile @@ -0,0 +1,20 @@ + # all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=mtcvtodd +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/converters/noff/Makefile b/converters/noff/Makefile new file mode 100644 index 0000000..4638e63 --- /dev/null +++ b/converters/noff/Makefile @@ -0,0 +1,20 @@ + # all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=noff +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/converters/sfmtcvt/Makefile b/converters/sfmtcvt/Makefile new file mode 100644 index 0000000..3ef2e3c --- /dev/null +++ b/converters/sfmtcvt/Makefile @@ -0,0 +1,20 @@ + # all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=sfmtcvt +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/converters/strrem/Makefile b/converters/strrem/Makefile new file mode 100644 index 0000000..23dbae4 --- /dev/null +++ b/converters/strrem/Makefile @@ -0,0 +1,20 @@ + # all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=strrem +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/converters/strsub/Makefile b/converters/strsub/Makefile new file mode 100644 index 0000000..a07f83d --- /dev/null +++ b/converters/strsub/Makefile @@ -0,0 +1,20 @@ + # all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=strsub +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/converters/tar2mt/Makefile b/converters/tar2mt/Makefile new file mode 100644 index 0000000..cab4548 --- /dev/null +++ b/converters/tar2mt/Makefile @@ -0,0 +1,20 @@ + # all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=tar2mt +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/converters/tp512cvt/Makefile b/converters/tp512cvt/Makefile new file mode 100644 index 0000000..39020ec --- /dev/null +++ b/converters/tp512cvt/Makefile @@ -0,0 +1,20 @@ + # all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=tp512cvt +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/converters/tpc2mt/Makefile b/converters/tpc2mt/Makefile new file mode 100644 index 0000000..e4b315b --- /dev/null +++ b/converters/tpc2mt/Makefile @@ -0,0 +1,20 @@ + # all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=tpc2mt +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/crossassemblers/Makefile b/crossassemblers/Makefile new file mode 100644 index 0000000..18cf775 --- /dev/null +++ b/crossassemblers/Makefile @@ -0,0 +1,33 @@ +# all of these can be over-ridden on the "make" command line if they don't suit your environment. + +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +.PHONY: all clean install uninstall + +# Omitted: macro11: needs more complicated Makefiles. +all: + cd hpasm && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd macro1 && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd macro7 && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd macro8x && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + +clean: + cd hpasm && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd macro1 && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd macro7 && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd macro8x && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + +install: + cd hpasm && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd macro1 && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd macro7 && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd macro8x && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + +uninstall: + cd hpasm && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd macro1 && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd macro7 && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd macro8x && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall diff --git a/crossassemblers/hpasm/Makefile b/crossassemblers/hpasm/Makefile new file mode 100644 index 0000000..f3c4445 --- /dev/null +++ b/crossassemblers/hpasm/Makefile @@ -0,0 +1,20 @@ +# all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=hpasm +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/crossassemblers/macro1/Makefile b/crossassemblers/macro1/Makefile new file mode 100644 index 0000000..7668d8c --- /dev/null +++ b/crossassemblers/macro1/Makefile @@ -0,0 +1,20 @@ +# all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=macro1 +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/crossassemblers/macro7/Makefile b/crossassemblers/macro7/Makefile new file mode 100644 index 0000000..311775e --- /dev/null +++ b/crossassemblers/macro7/Makefile @@ -0,0 +1,20 @@ +# all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=macro7 +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/crossassemblers/macro8x/Makefile b/crossassemblers/macro8x/Makefile new file mode 100644 index 0000000..bbc8baf --- /dev/null +++ b/crossassemblers/macro8x/Makefile @@ -0,0 +1,20 @@ +# all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=macro8x +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/extracters/Makefile b/extracters/Makefile new file mode 100644 index 0000000..be52cc8 --- /dev/null +++ b/extracters/Makefile @@ -0,0 +1,41 @@ +# all of these can be over-ridden on the "make" command line if they don't suit your environment. + +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +.PHONY: all clean install uninstall + +# Omitted: backup, ods2: need more complicated Makefiles. +all: + cd ckabstape && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd mmdir && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd mtdump && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd rawcopy && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd sdsdump && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + cd tpdump && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" + +clean: + cd ckabstape && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd mmdir && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd mtdump && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd rawcopy && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd sdsdump && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + cd tpdump && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" clean + +install: + cd ckabstape && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd mmdir && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd mtdump && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd rawcopy && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd sdsdump && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + cd tpdump && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" install + +uninstall: + cd ckabstape && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd mmdir && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd mtdump && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd rawcopy && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd sdsdump && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall + cd tpdump && $(MAKE) CFLAGS="$(CFLAGS)" BIN="$(BIN)" INSTALL="$(INSTALL)" CC="$(CC)" uninstall diff --git a/extracters/ckabstape/Makefile b/extracters/ckabstape/Makefile new file mode 100644 index 0000000..3c9f7d6 --- /dev/null +++ b/extracters/ckabstape/Makefile @@ -0,0 +1,20 @@ +# all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=ckabstape +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/extracters/ckabstape/ckabstape.c b/extracters/ckabstape/ckabstape.c index 4ac8995..68559d3 100644 --- a/extracters/ckabstape/ckabstape.c +++ b/extracters/ckabstape/ckabstape.c @@ -1,4 +1,5 @@ #include +#include static unsigned char sixlut[64] = { '@','A','B','C','D','E','F','G', @@ -41,8 +42,8 @@ unsigned int readframe() do{ c = getchar(); if(feof(stdin)) - exit(); - if((c & 0x80) == 0) printf("{nul}\n",c); + exit(0); + if((c & 0x80) == 0) printf("{nul}\n"); } while((c & 0x80) == 0); i = ((c & 0xc0)>>6)<<27; @@ -50,8 +51,8 @@ unsigned int readframe() do{ c = getchar(); if(feof(stdin)) - exit(); - if((c & 0x80) == 0) printf("{nul}\n",c); + exit(0); + if((c & 0x80) == 0) printf("{nul}\n"); } while((c & 0x80) == 0); i = i |((c & 0xc0)>>6)<<24; @@ -60,8 +61,8 @@ unsigned int readframe() do{ c = getchar(); if(feof(stdin)) - exit(); - if((c & 0x80) == 0) printf("{nul}\n",c); + exit(0); + if((c & 0x80) == 0) printf("{nul}\n"); } while((c & 0x80) == 0); i = i |((c & 0xc0)>>6)<<21; @@ -69,7 +70,7 @@ unsigned int readframe() return i; } -disasm(unsigned int instr) +void disasm(unsigned int instr) { char *idx; if(instr & 0010000) idx = ",X"; else idx = " "; @@ -248,7 +249,7 @@ disasm(unsigned int instr) case(0740000): printf("NOP "); break; - case(0740001): // CMA compliment AC + case(0740001): /* CMA compliment AC */ printf("CMA "); break; case(0740002): @@ -335,19 +336,20 @@ disasm(unsigned int instr) } } -main() +int main(int argc, char **argv) { int totalblks = 0; int badblks = 0; - unsigned int fullwd = 0; unsigned int currentwd = 0; - int wds = 0; int bytecnt = 0; int col = 0; int framecount; unsigned int cksum; unsigned int adr; - unsigned char c; + + (void) argc; + (void) argv; + /* * read 3 chars and pack them in a word */ @@ -373,22 +375,22 @@ main() * (check is in readframe..) */ - adr = readframe() & 0777777; // staring adr + adr = readframe() & 0777777; /*staring adr */ cksum = adr; printf("ADR: %010o\n", adr); - framecount = readframe() & 0777777; // word count + framecount = readframe() & 0777777; /* word count */ cksum += framecount; - framecount = -(0xfffe0000 | framecount); // sign extend + framecount = -(0xfffe0000 | framecount); /* sign extend */ printf("CNT: %010o (%d)\n", framecount, framecount); if((adr & 0700000) != 0){ printf("FRAMECOUNT == 0 START ADR == %06o\n", adr); printf("TOTAL BLKS %d TOTAL ERRS %d\n", totalblks, badblks); - exit(); + exit(0); } - currentwd = readframe() & 0777777; // checksum + currentwd = readframe() & 0777777; /* checksum */ cksum += currentwd; printf("CKS: %06o\n", currentwd); /* @@ -419,5 +421,7 @@ main() if(bytecnt > 0){ printf("%d chrs left\n", bytecnt); } + + exit(0); } diff --git a/extracters/mmdir/Makefile b/extracters/mmdir/Makefile new file mode 100644 index 0000000..db7d79a --- /dev/null +++ b/extracters/mmdir/Makefile @@ -0,0 +1,20 @@ +# all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=mmdir +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/extracters/mtdump/Makefile b/extracters/mtdump/Makefile new file mode 100644 index 0000000..84436cb --- /dev/null +++ b/extracters/mtdump/Makefile @@ -0,0 +1,20 @@ +# all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=mtdump +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/extracters/mtdump/mtdump.c b/extracters/mtdump/mtdump.c index 4c240ed..7941747 100644 --- a/extracters/mtdump/mtdump.c +++ b/extracters/mtdump/mtdump.c @@ -42,9 +42,10 @@ int main (int argc, char *argv[]) { int obj, i, k, fc, rc, tpos; -unsigned int bc, fmt, rlntsiz; -unsigned char *s, bca[4]; -int preveof, gapcount, gpos, gincr; +unsigned int bc = 0, fmt, rlntsiz; + unsigned char *s; + unsigned char bca[4] = { 0,0,0,0 }; +int preveof, gapcount, gpos = 0, gincr; FILE *ifile; #define MAXRLNT 65536 @@ -62,7 +63,7 @@ if ((s != NULL) && (*s++ == '-')) { fmt = F_E11; rlntsiz = 4; break; case 'C': case 'c': fmt = F_TPC; rlntsiz = 2; break; -/* case 'F': case 'f': + /* case 'F': case 'f': */ /* fmt = F_TPF; break; */ default: fprintf (stderr, "Bad option %c\n", *s); diff --git a/extracters/rawcopy/Makefile b/extracters/rawcopy/Makefile new file mode 100644 index 0000000..ff73f56 --- /dev/null +++ b/extracters/rawcopy/Makefile @@ -0,0 +1,20 @@ +# all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=RawCopy +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/extracters/rawcopy/RawCopy.c b/extracters/rawcopy/RawCopy.c index cfaea91..75636e2 100644 --- a/extracters/rawcopy/RawCopy.c +++ b/extracters/rawcopy/RawCopy.c @@ -34,7 +34,7 @@ while (0 != (bytesread = fread(buf, 1, readsize, fin))) { if (bytesread != fwrite(buf, 1, bytesread, fout)) { - fprintf(stderr, "Error Writing '%s': %s\n", strerror(errno)); + fprintf(stderr, "Error Writing '%s': %s\n", argv[2], strerror(errno)); break; } else @@ -46,4 +46,5 @@ fprintf(stderr, "\n"); fprintf(stderr, "Total Data: %6.2f MBytes (%d bytes)\n", totalbytes/(1024.0*1024.0), totalbytes); fclose(fin); fclose(fout); + exit(0); } diff --git a/extracters/sdsdump/Makefile b/extracters/sdsdump/Makefile new file mode 100644 index 0000000..4eb0576 --- /dev/null +++ b/extracters/sdsdump/Makefile @@ -0,0 +1,20 @@ +# all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=sdsdump +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/extracters/tpdump/Makefile b/extracters/tpdump/Makefile new file mode 100644 index 0000000..8010004 --- /dev/null +++ b/extracters/tpdump/Makefile @@ -0,0 +1,20 @@ +# all of these can be over-ridden on the "make" command line if they don't suit your environment. +TOOL=tpdump +CFLAGS=-O2 -Wall -Wshadow -Wextra -pedantic -Woverflow -Wstrict-overflow +BIN=/usr/local/bin +INSTALL=install +CC=gcc + +$(TOOL): $(TOOL).c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(TOOL) $(TOOL).c $(LDLIBS) + +.PHONY: clean install uninstall + +clean: + rm -f $(TOOL) + +install: $(TOOL) + $(INSTALL) -p -m u=rx,g=rx,o=rx $(TOOL) $(BIN) + +uninstall: + rm -f $(BIN)/$(TOOL) diff --git a/extracters/tpdump/tpdump.c b/extracters/tpdump/tpdump.c index 7b6fb94..97cf055 100644 --- a/extracters/tpdump/tpdump.c +++ b/extracters/tpdump/tpdump.c @@ -49,7 +49,6 @@ size_t read_len ( FILE* fi ) /* Read a little-endian four-byte number */ { unsigned char c; /* A Character from the file */ size_t i; - size_t lc; /* The character, as a long int */ size_t n; /* the number */ if ( fread ( &c, 1, 1, fi ) == 0 ) return (0); @@ -80,7 +79,7 @@ void usage ( char* argv[] ) printf ( " -o Use the 'old simh' print arrangement\n"); } -main ( int argc, char* argv[] ) +int main ( int argc, char* argv[] ) { FILE* fi; int all; /* "print all of a record, even blank lines" */ char* bcd_to_ascii; /* Translation table, ..._a or ..._h */ @@ -136,7 +135,7 @@ main ( int argc, char* argv[] ) for ( nb=1, i=np; i>0; i/=10, nb++ ) pr[np-nb] = '0' + ( i%10 ); printf ( " %s\n", pr ); nr = 0; - while ( recsiz = read_len ( fi ) ) + while ( (recsiz = read_len ( fi )) ) { nb = 1; nr++; i = recsiz; @@ -148,7 +147,7 @@ main ( int argc, char* argv[] ) return(3); } i--; - pr[np] = bcd_to_ascii[pr[np]]; + pr[np] = bcd_to_ascii[(unsigned int)pr[np]]; if ( dowm ) if ( pr[np] == bcd_to_ascii[BCD_WM] ) wm[np--] = '1'; } @@ -181,4 +180,5 @@ main ( int argc, char* argv[] ) } if ( nf > 0 ) printf ( "File %d\n", ++nft ); } + return(0); }