# @(#) $Revision: 72.9 $
#
# makefile for Special File commands
#

INS=:
INCL_DIR=/usr/include
CFLAGS=-I$(INCL_DIR) +DA1.0 +DS1.0

OBJS=	main.o audio.o autoch.o cent.o diaghpib1.o disk.o hil.o \
	instr0.o lan.o lantty.o lpr.o mux.o ps2.o pseudo.o tape.o \
	hpux_rel.o

SRCS=	main.c audio.c autoch.c cent.c diaghpib1.c disk.c hil.c \
	instr0.c lan.c lantty.c lpr.c mux.c ps2.c pseudo.c tape.c \
	hpux_rel.c

default: mksf mksf.arch

metrics: mksf.M

mksf:	${OBJS} 
	${CC} ${CFLAGS} -o mksf ${OBJS} -lIO

mksf.arch:	${OBJS} 
	${CC} ${CFLAGS} -o mksf.arch ${OBJS} -Wl,-a,archive -lIO

mksf.M:	${SRCS}
	${METRICS} ${CFLAGS} -o mksf.M ${SRCS} -Wl,-a,archive -lIO

insf:	mksf
	ln mksf insf

lssf:	mksf
	ln mksf lssf

rmsf:	mksf
	ln mksf rmsf

all:	mksf insf lssf rmsf

install: mksf
	${INS} mksf

clean:
	rm -f a.out core *.o \#*

clobber: clean
	rm -f insf lssf mksf
	
lint:
	lint -Dvolatile= -I$(LIBR_DIR) -I$(INCL_DIR) -D_HPUX_SOURCE \
		${SRCS} -lIO

audio.o: sf.h $(INCL_DIR)/stdio.h audio.c

autoch.o: $(INCL_DIR)/sys/param.h $(INCL_DIR)/sys/sysmacros.h \
	$(INCL_DIR)/stdio.h $(INCL_DIR)/string.h sf.h autoch.c

cent.o: sf.h $(INCL_DIR)/stdio.h cent.c

diaghpib1.o: sf.h $(INCL_DIR)/stdio.h diaghpib1.c

disk.o: $(INCL_DIR)/stdio.h $(INCL_DIR)/string.h $(INCL_DIR)/sys/libIO.h \
	sf.h disk.c

gpio.o: sf.h $(INCL_DIR)/stdio.h gpio.c

hil.o: sf.h $(INCL_DIR)/stdio.h hil.c

hpux_rel.o: hpux_rel.c

instr0.o: sf.h $(INCL_DIR)/stdio.h instr0.c

lan.o: sf.h $(INCL_DIR)/stdio.h lan.c

lantty.o: sf.h $(INCL_DIR)/stdio.h lantty.c

lpr.o: sf.h $(INCL_DIR)/stdio.h $(INCL_DIR)/unistd.h lpr.c

main.o: $(INCL_DIR)/errno.h $(INCL_DIR)/ftw.h $(INCL_DIR)/grp.h \
	$(INCL_DIR)/pwd.h $(INCL_DIR)/stdio.h $(INCL_DIR)/stdlib.h \
	$(INCL_DIR)/string.h $(INCL_DIR)/unistd.h $(INCL_DIR)/sys/param.h \
	$(INCL_DIR)/sys/types.h $(INCL_DIR)/sys/sysmacros.h \
	$(INCL_DIR)/sys/stat.h sf.h main.c

mux.o: $(INCL_DIR)/errno.h $(INCL_DIR)/fcntl.h $(INCL_DIR)/stdio.h \
	$(INCL_DIR)/sys/libIO.h $(INCL_DIR)/sio/dac.h sf.h mux.c

ps2.o: sf.h $(INCL_DIR)/stdio.h ps2.c

pseudo.o: $(INCL_DIR)/sys/sysmacros.h $(INCL_DIR)/stdio.h sf.h pseudo.c

tape.o: $(INCL_DIR)/ctype.h $(INCL_DIR)/errno.h $(INCL_DIR)/fcntl.h \
	$(INCL_DIR)/limits.h $(INCL_DIR)/stdio.h $(INCL_DIR)/unistd.h \
	$(INCL_DIR)/sys/param.h $(INCL_DIR)/sys/sysmacros.h \
	$(INCL_DIR)/sys/mtio.h $(INCL_DIR)/stdlib.h $(INCL_DIR)/unistd.h \
	sf.h tape.c

