aboutsummaryrefslogtreecommitdiff
path: root/jindroush/Makefile
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-05-16 01:43:09 -0400
committerB. Watson <urchlay@slackware.uk>2024-05-16 01:43:09 -0400
commita4cc3ad3504d634e379369862c9f9fd8eed379f3 (patch)
tree7b6f55c352a4ca62dddaa1b4a6854799111d2d2f /jindroush/Makefile
parentb33c25d1363110e6e4a714530f460b0ff951f56b (diff)
downloadbw-atari8-tools-a4cc3ad3504d634e379369862c9f9fd8eed379f3.tar.gz
Add Jindrich Kubec's tools.
Diffstat (limited to 'jindroush/Makefile')
-rw-r--r--jindroush/Makefile62
1 files changed, 62 insertions, 0 deletions
diff --git a/jindroush/Makefile b/jindroush/Makefile
new file mode 100644
index 0000000..0a11a8f
--- /dev/null
+++ b/jindroush/Makefile
@@ -0,0 +1,62 @@
+# Unified Makefile for Jindroush's various Atari 8-bit utilities
+
+DESTDIR=
+PREFIX=/usr/local
+BINDIR=$(PREFIX)/bin
+DOCDIR=$(PREFIX)/share/doc/jindroush_atari8_utils
+
+MANDIR=$(PREFIX)/share/man
+MAN1DIR=$(MANDIR)/man1
+
+GZIP_MAN=y
+RST2MAN=rst2man
+
+BINS=acvt adir aext bas2boot chkbas chkexe chkrom
+
+# The -Wno-write-strings prevents hundreds of "ISO C++ forbids
+# converting a string to 'char*'" warnings. Eventually will fix.
+W=-Wall -Wno-write-strings
+
+all: libs manpages
+ for i in $(BINS); do \
+ make -C $$i COPT="$(COPT) $(W)" ; \
+ done
+
+manpages:
+ make -C man
+
+libs:
+ make -C lib COPT="$(COPT) $(W)"
+
+clean:
+ make -C lib clean
+ for i in $(BINS); do \
+ make -C $$i clean ; \
+ done
+
+install: all
+ mkdir -p $(DESTDIR)/$(BINDIR) $(DESTDIR)/$(DOCDIR) ; \
+ cp README.txt $(DESTDIR)/$(DOCDIR)/README_jindroush.txt ; \
+ cp gpl.txt $(DESTDIR)/$(DOCDIR)/gpl.txt ; \
+ for i in $(BINS); do \
+ strip $$i/$$i ; \
+ cp $$i/$$i $(DESTDIR)/$(BINDIR)/$$i ; \
+ chown root.root $$i/$$i $(DESTDIR)/$(BINDIR)/$$i 2>/dev/null || true ; \
+ chmod 755 $(DESTDIR)/$(BINDIR)/$$i ; \
+ cp $$i/readme.txt $(DESTDIR)/$(DOCDIR)/$$i.txt ; \
+ chown root.root $(DESTDIR)/$(DOCDIR)/$$i.txt 2>/dev/null || true ; \
+ chmod 644 $(DESTDIR)/$(DOCDIR)/$$i.txt ; \
+ done ; \
+ mkdir -p $(DESTDIR)/$(MAN1DIR) ; \
+ for i in $(BINS); do \
+ cp man/$$i.1 $(DESTDIR)/$(MAN1DIR) ; \
+ chown root.root $(DESTDIR)/$(MAN1DIR)/$$i.1 2>/dev/null || true ; \
+ chmod 644 $(DESTDIR)/$(MAN1DIR)/$$i.1 ; \
+ [ "$(GZIP_MAN)" = "y" ] && gzip -f $(DESTDIR)/$(MAN1DIR)/$$i.1 ; \
+ done
+ ln -sf chkbas $(DESTDIR)$(BINDIR)/listbas
+ if [ "$(GZIP_MAN)" = "y" ]; then \
+ ln -sf chkbas.1.gz $(DESTDIR)$(MAN1DIR)/listbas.1.gz ; \
+ else \
+ ln -sf chkbas.1 $(DESTDIR)$(MAN1DIR)/listbas.1 ; \
+ fi