From f9dcbdd176785dfc9d49f3113ec6110199e9a246 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 10 May 2024 17:24:40 -0400 Subject: import ken siders atr utilities. --- ksiders/Makefile | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 ksiders/Makefile (limited to 'ksiders/Makefile') diff --git a/ksiders/Makefile b/ksiders/Makefile new file mode 100644 index 0000000..674b3e6 --- /dev/null +++ b/ksiders/Makefile @@ -0,0 +1,67 @@ + +# This Makefile has been tested with GNU make and /usr/ccs/bin/make +# on a Solaris 2.6 (SunOS 5.6) system. + +CC=gcc +COPT=-O2 +CFLAGS=-Wall $(COPT) -ansi -fpack-struct + +# -pedantic complains about some perfectly harmless signed/unsigned +# char pointer stuff. + +# Note: -fpack-struct works on gcc's at least as old as 2.95.3 +# If you're not using gcc, find your compiler's equivalent option +# (/Zp on Microsoft compilers). + +DESTDIR= +PREFIX=/usr/local +BINDIR=$(PREFIX)/bin +MANDIR=$(PREFIX)/man +MAN1DIR=$(MANDIR)/man1 + +# some systems need this instead: +#MANDIR=$(PREFIX)/share/man + +# Comment out next line if your system does not support gzip'ed man pages +GZIP_MAN=y + +EXES=atrdir atrextr makeatr sortatr unmakatr +MANS=atrdir atrextr makeatr sortatr + +all: $(EXES) + +clean: + rm -f $(EXES) atr.o tags *~ *.bak + +install: all + mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR) ;\ + for exe in $(EXES) ; do \ + strip $$exe ;\ + cp $$exe $(DESTDIR)$(BINDIR)/$$exe ;\ + done ;\ + for man in $(MANS) ; do \ + if [ "$(GZIP_MAN)" = "y" ]; then \ + gzip -c < $$man.1 > $(DESTDIR)$(MAN1DIR)/$$man.1.gz ;\ + else \ + cp $$man.1 $(DESTDIR)$(MAN1DIR) ; \ + fi ;\ + done + if [ "$(GZIP_MAN)" = "y" ]; then \ + cd $(DESTDIR)$(MAN1DIR) && rm -f unmakatr.1.gz && ln -s makeatr.1.gz unmakatr.1.gz ;\ + else \ + cd $(DESTDIR)$(MAN1DIR) && rm -f unmakatr.1 && ln -s makeatr.1 unmakatr.1 ;\ + fi + + +atr.o: atr.c atr.h atdos.h kboot.h + +atrdir: atrdir.c atr.o + +atrextr: atrextr.c atr.o + +makeatr: makeatr.c atr.o + +sortatr: sortatr.c atr.o + +unmakatr: unmakatr.c atr.o + -- cgit v1.2.3