diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 72 |
1 files changed, 61 insertions, 11 deletions
@@ -1,3 +1,4 @@ +# This Makefile requires GNU make. # Install paths. DESTDIR is used for installing to an alternate location, # for people making RPM/deb/tgz/etc packages. @@ -9,6 +10,9 @@ MAN1DIR=$(MANDIR)/man1 MAN5DIR=$(MANDIR)/man5 MAN7DIR=$(MANDIR)/man7 DOCDIR=$(PREFIX)/share/doc/bw-atari8-tools +PSFDIR=$(PREFIX)/share/kbd/consolefonts +BDFDIR=$(PREFIX)/share/share/fonts/misc +TTFDIR=$(PREFIX)/share/share/fonts/TTF # Compiler stuff COPT=-O2 @@ -16,17 +20,20 @@ CC=gcc CFLAGS=-Wall $(COPT) -ansi -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" # BINS and SCRIPTS go in $BINDIR, DOCS go in $DOCDIR -BINS=a8eol atr2xfd atrsize axe blob2c blob2xex cart2xex cxrefbas dumpbas fenders protbas renumbas rom2cart unmac65 unprotbas vxrefbas xex1to2 xexamine xexcat xexsplit xfd2atr listbas a8cat a8xd -SCRIPTS=dasm2atasm -MANS=a8eol.1 xfd2atr.1 atr2xfd.1 blob2c.1 cart2xex.1 fenders.1 xexsplit.1 xexcat.1 atrsize.1 rom2cart.1 unmac65.1 axe.1 dasm2atasm.1 blob2xex.1 xexamine.1 xex1to2.1 unprotbas.1 protbas.1 renumbas.1 dumpbas.1 vxrefbas.1 cxrefbas.1 listbas.1 a8cat.1 a8xd.1 +BINS=a8eol atr2xfd atrsize axe blob2c blob2xex cart2xex cxrefbas dumpbas fenders protbas renumbas rom2cart unmac65 unprotbas vxrefbas xex1to2 xexamine xexcat xexsplit xfd2atr listbas a8cat a8xd whichbas bas2aplus listamsb +SCRIPTS=dasm2atasm diffbas a8diff colorize-amsb abas2html +MANS=a8eol.1 xfd2atr.1 atr2xfd.1 blob2c.1 cart2xex.1 fenders.1 xexsplit.1 xexcat.1 atrsize.1 rom2cart.1 unmac65.1 axe.1 dasm2atasm.1 blob2xex.1 xexamine.1 xex1to2.1 unprotbas.1 protbas.1 renumbas.1 dumpbas.1 vxrefbas.1 cxrefbas.1 listbas.1 a8cat.1 a8xd.1 whichbas.1 diffbas.1 a8diff.1 bas2aplus.1 listamsb.1 colorize-amsb.1 abas2html.1 MAN5S=xex.5 -MAN7S=atascii.7 -DOCS=README.txt equates.inc *.dasm LICENSE ksiders/atr.txt +MAN7S=atascii.7 fauxtari.7 amsb.7 ossintbas.7 +DOCS=README.txt CHANGES.txt equates.inc *.dasm LICENSE ksiders/atr.txt +PSFS=fonts/fauxtari-8.psf fonts/fauxtari-16.psf fonts/fauxtari-24.psf +BDFS=fonts/fauxtari-8.bdf fonts/fauxtari-16.bdf fonts/fauxtari-24.bdf +TTF=fonts/FauxtariScalableMono.ttf SUBDIRS=ksiders jindroush # All the programs share this version number... -VERSION=0.2.1 +VERSION=0.2.2 # If your system doesn't support gzipped man pages, comment this out: GZIP_MAN=y @@ -47,7 +54,11 @@ RST2MAN=rst2man # "make clean" and "make distclean" will not delete the 6502 object # code (the *.bin files), but "make realclean" will. -all: $(BINS) manpages symlinks subdirs +all: $(BINS) manpages symlinks subdirs $(TTF) amsb40.txt + +atest: atest.c atascii.c atables.c wtable.c + +intbas: bas.o unprotbas: bas.o @@ -57,12 +68,18 @@ renumbas: bas.o bcdfp.o linetab.o dumpbas: bas.o +whichbas: bas.o + vxrefbas: bas.o cxrefbas: bas.o bcdfp.o linetab.o -listbas: listbas.c bas.o bcdfp.o tokens.o atables.o - $(CC) $(CFLAGS) -o listbas listbas.c bas.o bcdfp.o tokens.o atables.o -lm +bas2aplus: bas.o + +listbas: listbas.c bas.o bcdfp.o tokens.o atables.o turbo_tokens.o aplus_tokens.o bxl_tokens.o bxe_tokens.o int_disk_tokens.o int_tokens.o + $(CC) $(CFLAGS) -o listbas listbas.c bas.o bcdfp.o tokens.o atables.o turbo_tokens.o aplus_tokens.o bxl_tokens.o bxe_tokens.o int_disk_tokens.o int_tokens.o -lm + +listamsb: listamsb.o atascii.o atables.o bas.o: bas.c bas.h @@ -70,12 +87,12 @@ wtable.o: wtable.c wtable.h atables.o: atables.c atables.h -a8cat: a8cat.c atables.o wtable.o +a8cat: a8cat.c atables.o wtable.o atascii.o a8xd: a8xd.c atables.o subdirs: - for dir in $(SUBDIRS); do make -C $$dir COPT="$(COPT)"; done + @for dir in $(SUBDIRS); do ${MAKE} --no-print-directory -C $$dir COPT="$(COPT)"; done a8eol: a8eol.c @@ -174,9 +191,24 @@ manpages: $(MANS) $(MAN5S) $(MAN7S) %.5: %.rst manhdr5.rst manftr.rst $(RST2MAN) $< > $@ +amsb.7: amsb.rst manhdr7.rst manftr.rst amsb_content.rst + +ossintbas.7: ossintbas.rst manhdr7.rst manftr.rst ossintbas_content.rst + %.7: %.rst manhdr7.rst manftr.rst $(RST2MAN) $< > $@ +fonts/fauxtari-8.bdf: fonts/mkpsf.pl + ( cd fonts && perl mkpsf.pl ) + +$(TTF): fonts/fauxtari-8.bdf + bitmapfont2ttf --family-name "Fauxtari Scalable Mono" fonts/fauxtari-8.bdf $(TTF) + +# 40-column version of amsb.7, as plain text, for use an an Atari BBS. +amsb40.txt: amsb_content.rst amsb40.rst + rst2man amsb40.rst > amsb40.7 + LANG=C MANWIDTH=40 man --nj ./amsb40.7 > amsb40.txt + # "make clean" does NOT remove the .bin or _bin.[ch] files. This is # for people who don't have either dasm or atasm installed. # also, it doesn't remove the man pages. these are checked into git, even. @@ -227,3 +259,21 @@ install-subdirs: subdirs for dir in $(SUBDIRS); do \ make -C $$dir DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) BINDIR=$(BINDIR) MAN1DIR=$(MAN1DIR) GZIP_MAN=$(GZIP_MAN) DOCDIR=$(DOCDIR) install; \ done + +install-fonts: all + sh install-fonts.sh "$(DESTDIR)" "$(BDFDIR)" "$(TTFDIR)" + +user-font: user-fonts + +user-fonts: + $(MAKE) install-fonts BDFDIR=$(HOME)/.fonts TTFDIR=$(HOME)/.fonts + +user-symlinks: all + SRC=$$( pwd ) ; \ + mkdir -p ~/bin ; \ + cd ~/bin && \ + for i in $(BINS) $(SCRIPTS) \ + ksiders/atrdir ksiders/atrextr ksiders/makeatr ksiders/sortatr ksiders/unmakatr \ + jindroush/chkrom/chkrom jindroush/chkbas/chkbas jindroush/bas2boot/bas2boot \ + jindroush/chkexe/chkexe jindroush/adir/adir jindroush/acvt/acvt jindroush/aext/aext \ + ; do rm -f $$i; ln -sf $$SRC/$$i . ; done |