# makefile for zspeccyutils

CC=gcc

# this is really for tzxplay - nothing else needs much optimising.
CFLAGS=-O2 -finline-functions

# where to install
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin

# you shouldn't need to edit past this line.


TARGETS=ldirsna infosna pokesna ppmtozx sendsna \
	tzxplay zxgettap zxtoppm

all: $(TARGETS) zxsend/zxsend

zxsend/zxsend:
	$(MAKE) -C zxsend

install:
	install -m 511 -s $(TARGETS) zxsend/zxsend $(BINDIR)

clean:
	$(MAKE) -C zxsend clean
	$(RM) *.o $(TARGETS) *~ *.lst


VERS=1.0

tgz: ../zspeccyutils-$(VERS).tar.gz
  
../zspeccyutils-$(VERS).tar.gz: clean
	$(RM) ../zspeccyutils-$(VERS)
	@cd ..;ln -s zspeccyutils zspeccyutils-$(VERS)
	cd ..;tar zchvf zspeccyutils-$(VERS).tar.gz zspeccyutils-$(VERS)
	@cd ..;$(RM) zspeccyutils-$(VERS)
