# 
#  Copyright (c) 1989 Brian Sturgill
#  All rights reserved.
# 
#  Redistribution and use in source and binary forms are permitted
#  provided that the above copyright notice and this paragraph are
#  duplicated in all such forms and that any documentation,
#  advertising materials, and other materials related to such
#  distribution and use acknowledge that the software was developed
#  by Brian Sturgill and Raphael Finkel at the University of Kentucky,
#  Department of Computer Science.  The names of the University or the
#  authors may not be used to endorse or promote products derived
#  from this software without specific prior written permission.
#  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
#  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
#  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#

SALINCLUDE = /usr/local/etc/sat/salinclude
DESTDIR = /usr/local/bin
MANDIR = /usr/local/man
CC = gcc

all: ifme

ifme: ifme.sal 
	$(CC) -c stdhostmachelper.c
	sal -n ifme.sal stdhostmachelper.o -o ifme

# the following are not fully debugged and we do not use them.

rdf: rdf.sal
	sal -n rdf.sal -o rdf

rrun: rrun.sal
	sal -n rrun.sal -o rrun

install: $(DESTDIR)/ifme /usr/local/etc/sat/salinclude/stdhostmac.sal

$(DESTDIR)/ifme: ifme
	install -c -o bin -g bin -m 755 ifme $(DESTDIR)

$(SALINCLUDE)/stdhostmac.sal: stdhostmac.sal
	install -c -o bin -g bin -m 644 stdhostmac.sal $(SALINCLUDE)
	install -c -o bin -g bin -m 644 stdhostmachelper.c $(SALINCLUDE)

clean:
	rm -f ifme rdf rrun *.o a.out core

doc:
	cp ifme.8 $(MANDIR)/man8/

lint:
