# -----------------------------------------------------------------------------
# Makefile for DESPICable
# Copyright 1998, 1999 Eric Smith
#
# WARNING: This software may be subject to export controls
#
# http://www.brouhaha.com/~eric/pic/
# http://www.brouhaha.com/~eric/crypto/
#
# DESPICable is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.  Note that I am not
# granting permission to redistribute or modify DESPICable under the
# terms of any later version of the General Public License.
# 
# This program is distributed in the hope that it will be useful (or at
# least amusing), but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program (in the file "COPYING"); if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# $Id: Makefile,v 1.3 1999/05/07 01:57:31 eric Exp $
# -----------------------------------------------------------------------------

PACKAGE = despicable
MAJORVER = 1
MINORVER = 01

MISCFILES = COPYING Makefile
SOURCES = destest.asm des.inc testvec.inc
TARGETS = destest.hex

# -----------------------------------------------------------------------------
# The following rules should not need to be changed
# -----------------------------------------------------------------------------

VERSION = $(MAJORVER).$(MINORVER)
DISTNAME = $(PACKAGE)-$(VERSION)

all: $(TARGETS)

%.hex %.lst : %.asm
	gpasm $<

DISTFILES = $(MISCFILES) $(SOURCES) $(HEADERS)

dist: $(DISTNAME).tgz $(DISTNAME).zip

$(DISTNAME).tgz: $(DISTFILES)
	-rm -rf $(DISTNAME)
	mkdir $(DISTNAME)
	for f in $(DISTFILES); do ln $$f $(DISTNAME)/$$f; done
	tar --gzip -chf $(DISTNAME).tgz $(DISTNAME)
	-rm -rf $(DISTNAME)

$(DISTNAME).zip: $(DISTFILES)
	-rm -rf $(DISTNAME)
	mkdir $(DISTNAME)
	for f in $(DISTFILES); do ln $$f $(DISTNAME)/$$f; done
	zip -9 -r $(DISTNAME).zip $(DISTNAME)
	-rm -rf $(DISTNAME)


# -----------------------------------------------------------------------------
# dependencies
# -----------------------------------------------------------------------------

destest.hex: destest.asm des.inc testvec.inc

