aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile150
1 files changed, 0 insertions, 150 deletions
diff --git a/src/Makefile b/src/Makefile
deleted file mode 100644
index da19876..0000000
--- a/src/Makefile
+++ /dev/null
@@ -1,150 +0,0 @@
-# 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
-# COPT instead.
-
-# C compiler to use. PATH is searched unless you give an absolute path.
-CC=cc
-
-# C compiler options (flags):
-COPT=-O3
-
-# Path to the GNU or BSD 'install' program.
-INSTALL=install
-
-# Path to the rst2man command. Only needed if modifying/rebuilding the
-# man pages and/or windows HTML docs.
-RST2MAN=rst2man
-
-# These only affect the 'install' target (they don't get compiled
-# into the binary).
-
-PREFIX=/usr
-MANDIR=$(PREFIX)/man
-MAN1DIR=$(MANDIR)/man1
-BINDIR=$(PREFIX)/bin
-DOCDIR=$(PREFIX)/doc/$(PROJ)-$(VERSION)
-DESTDIR=
-INSTALL_DATA=$(INSTALL) -m0644
-INSTALL_PROGRAM=$(INSTALL) -m0755
-GZIP=gzip -9
-GZIP_MAN=yes
-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: $(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
-# gonna ever work.
-unalf: $(UNALF_OBJS)
- $(CC) $(LDFLAGS) -o $@ $(UNALF_OBJS)
-
-alfsum: $(ALFSUM_OBJS)
- $(CC) $(LDFLAGS) -o $@ $(ALFSUM_OBJS)
-
-alf: $(ALF_OBJS)
- $(CC) $(LDFLAGS) -o $@ $(ALF_OBJS)
-
-usage.o: usage.c
-
-alfusage.o: usage.c
-
-f65.o: ../f65/f65.c ../f65/f65.h
- $(CC) $(CFLAGS) -c -o f65.o ../f65/f65.c
-
-usage.c: mkusage.pl unalf.rst
- perl mkusage.pl unalf.rst > usage.c
-
-alfusage.c: mkusage.pl alf.rst
- perl mkusage.pl alf.rst > alfusage.c
-
-unalf.o: unalf.c unalf.h ../f65/f65.h
-
-glob.o: glob.c unalf.h
-
-opts.o: opts.c unalf.h
-
-io.o: io.c unalf.h addrs.h ../f65/f65.h
-
-listalf.o: listalf.c addrs.h unalf.h ../f65/f65.h
-
-extract.o: extract.c addrs.h unalf.h ../f65/f65.h
-
-ver.rst:
- echo '.. |version| replace:: $(VERSION)' > ver.rst
-
-unalf.1: unalf.rst ver.rst manftr.rst
- $(RST2MAN) unalf.rst > unalf.1
-
-alfsum.1: alfsum.rst ver.rst manftr.rst
- $(RST2MAN) alfsum.rst > alfsum.1
-
-alf.1: alf.rst ver.rst manftr.rst
- $(RST2MAN) alf.rst > alf.1
-
-clean:
- 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.
-realclean: clean
- rm -f unalf.1 alfsum.1 usage.c alfusage.c
-
-install: all
- [ "$(STRIP)" = "yes" ] && strip alf unalf alfsum || true
- mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MAN1DIR) $(DESTDIR)$(DOCDIR)
- $(INSTALL_DATA) alf.1 $(DESTDIR)$(MAN1DIR)
- $(INSTALL_DATA) unalf.1 $(DESTDIR)$(MAN1DIR)
- $(INSTALL_DATA) alfsum.1 $(DESTDIR)$(MAN1DIR)
- [ "$(GZIP_MAN)" = "yes" ] && $(GZIP) $(DESTDIR)$(MAN1DIR)/alf.1 || true
- [ "$(GZIP_MAN)" = "yes" ] && $(GZIP) $(DESTDIR)$(MAN1DIR)/unalf.1 || true
- [ "$(GZIP_MAN)" = "yes" ] && $(GZIP) $(DESTDIR)$(MAN1DIR)/alfsum.1 || true
- $(INSTALL_PROGRAM) alf $(DESTDIR)$(BINDIR)
- $(INSTALL_PROGRAM) unalf $(DESTDIR)$(BINDIR)
- $(INSTALL_PROGRAM) alfsum $(DESTDIR)$(BINDIR)
- cp -r ../README.txt ../LICENSE.txt ../TODO.txt ../doc ../examples $(DESTDIR)$(DOCDIR)
-
-crosswin: clean
- $(MAKE) CC=~/x-tools/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc
-
-html: alfsum.html unalf.html alf.html
-
-alf.html: alf.rst
- rst2html alf.rst > alf.html
-
-alfsum.html: alfsum.rst
- rst2html alfsum.rst > alfsum.html
-
-unalf.html: unalf.rst
- rst2html unalf.rst > unalf.html
-
-windows: crosswin html
- 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 ../../$(PROJ)-$(VERSION)-win64.zip *
-
-windows-upload: windows
- scp ../$(PROJ)-$(VERSION)-win64.zip sluk:public_html/html/$(PROJ)4win/