aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/Makefile b/src/Makefile
index 91cb6f0..da19876 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,4 +1,4 @@
-# Makefile for unalf, by B. Watson. WTFPL.
+# Makefile for alftools, by B. Watson. WTFPL.
# Tested with GNU make, BSD make, makepp, and Schily's dmake.
### Override these variables as needed. Don't override CFLAGS; use
@@ -24,7 +24,7 @@ PREFIX=/usr
MANDIR=$(PREFIX)/man
MAN1DIR=$(MANDIR)/man1
BINDIR=$(PREFIX)/bin
-DOCDIR=$(PREFIX)/doc/unalf-$(VERSION)
+DOCDIR=$(PREFIX)/doc/$(PROJ)-$(VERSION)
DESTDIR=
INSTALL_DATA=$(INSTALL) -m0644
INSTALL_PROGRAM=$(INSTALL) -m0755
@@ -35,17 +35,21 @@ STRIP=yes
#
### No user-serviceable parts below.
+PROJ=alftools
VERSION=0.2.0
CFLAGS=-DVERSION='"$(VERSION)"' -Wall -I../f65 $(COPT)
+BINS=alf alfsum unalf
+MANS=alf.1 alfsum.1 unalf.1
+
UNALF_OBJS=unalf.o io.o listalf.o extract.o f65.o glob.o opts.o usage.o self.o asmcode.o
ALFSUM_OBJS=alfsum.o self.o
ALF_OBJS=alf.o self.o alfusage.o
.PHONY: all clean install crosswin windows windows-upload realclean
-all: unalf unalf.1 alfsum alfsum.1 alf alf.1
+all: $(BINS) $(MANS)
# unalf and alfsum need explicit rules for BSD make compatibility.
# without them, bmake tries to run "cc -o unalf unalf.c" which ain't
@@ -97,7 +101,7 @@ alf.1: alf.rst ver.rst manftr.rst
$(RST2MAN) alf.rst > alf.1
clean:
- rm -rf *.o unalf alfsum *.exe wintmp \
+ rm -rf *.o $(BINS) *.exe wintmp \
alf.html unalf.html alfsum.html *.aarch64.elf *.com.dbg
# these are generated files, but they *are* checked into git.
@@ -133,14 +137,14 @@ unalf.html: unalf.rst
rst2html unalf.rst > unalf.html
windows: crosswin html
- rm -rf wintmp ../unalf-$(VERSION)-win64.zip
+ rm -rf wintmp ../$(PROJ)-$(VERSION)-win64.zip
mkdir -p wintmp/{doc,examples}
cp alf.exe unalf.exe alfsum.exe wintmp
cd .. ; for i in README.txt TODO.txt doc/*.txt doc/Arcinfo examples/*.txt; do perl -pe 's,\n,\r\n,;' $$i > src/wintmp/$$i; done
perl -p -e 's,\n,\r\n,;' -e 's,\@VERSION\@,$(VERSION),g;' README_Windows.txt.in > wintmp/README_Windows.txt
cp ../examples/*.alf wintmp/examples
cp alfsum.html unalf.html alf.html wintmp
- cd wintmp ; zip -r ../../unalf-$(VERSION)-win64.zip *
+ cd wintmp ; zip -r ../../$(PROJ)-$(VERSION)-win64.zip *
windows-upload: windows
- scp ../unalf-$(VERSION)-win64.zip sluk:public_html/html/unalf4win/
+ scp ../$(PROJ)-$(VERSION)-win64.zip sluk:public_html/html/$(PROJ)4win/