# Makefile for prommer/linux and the required tio device

#
#
# Linux-x86 software for eprommer "Quickbyte 2.0 (Amiga)"
# ========================================================================
# Copyright 1996 thh-computergraphics. Refer to GPL for copying.
#
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Public License for more details.
#
# You should have received a copy of the GNU Public License along with
# this software; if not, write to the Free Software Foundation,
# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
# Thorsten Hempel
# Meisterstr. 23
# 23919 Berkenthin
# thh@valis.pumuckl.cubenet.de
#



EXPORT = Makefile eprommer.html prommer.c prommer-hw.h prommer.doc prommer.lbm tio.c tio.h COPYING
ARCHIV = *.c *.h *.rom *.lbm Makefile *.doc *.txt *.html alt COPYING
SYSTEM = LINUX
MAJOR = 60
MINOR = 128


all:  prommer tio.o zero.rom



# tio.o ist ein ladbares kernel-modul zur linux-echtzeitprogrammierung...
tio.o: tio.c tio.h prommer-hw.h
	cc -D__KERNEL__ -DMODULE -O2 -c tio.c -o tio.o
	@echo "Use 'insmod tio.o' to include tio.o into the kernel!"


# device-file MAJOR=29, MINOR=1
# Don't allow non root users to use the tio device, it could
# easily break system security!
device:
	- mknod /dev/tio c $(MAJOR) $(MINOR) -m 600
	@echo "Don't allow non root users to use the tio device," 
	@echo "it could easily break system security!"



# das eigentliche programm zur eprom-programmierung
prommer: prommer.c tio.h prommer-hw.h
	gcc -O -g -D$(SYSTEM) -s prommer.c -o prommer


# das ausgelieferte archiv
export:
	tar cvf - $(EXPORT) | gzip -9 >export.tgz
	uuencode <export.tgz >prommer.uue prommer.tgz
	uuencode <eprommer.html >html.uue eprommer.html


# das eigene archiv (enthaelt auch private daten)
archiv:
	- rm -f zero.rom
	tar cvf - $(ARCHIV) | gzip -9 >prommer.tgz
	cp prommer.tgz /home/thh/archiv

# eine hilfsdatei, die nur aus nullen besteht
zero.rom: Makefile
	dd if=/dev/zero of=zero.rom bs=1024 count=64


clean:
	rm -rf *.tgz *.uue core *.o zero.rom prommer


# end of file






