CFLAGS = -D_KERNEL    # -DPRE_SOLARIS_2_5
ASFLAGS = -P
CC = /opt/SUNWspro/bin/cc

load: sethostid
	/usr/sbin/modload ./sethostid

sethostid: sethostid.o
	/usr/ccs/bin/ld -r -o sethostid sethostid.o

sid: sid.c
	grep sethostid /etc/name_to_sysnum | sed 's/^/#define SYS_/' >sethostid.h
	$(CC) -o sid -I. sid.c

install: sethostid sid
	/usr/sbin/install -f /kernel/sys -m 0755 -u root -g sys ./sethostid
	/usr/sbin/install -f /usr/local/bin -m 0755 -u root -g sys ./sid

clean:
	rm -f core *.o sid sethostid sethostid.h
