# $Source: /hpux/shared/supp//usr/src/cmd/file/./makefile,v $
# $Revision: 78.1 $

#
#	Makefile for file command -- necessary to install /etc/magic
#
FINDMSG= findmsg
GENCAT= gencat
FLAGS = -D_FILE_OFFSET_BITS=64

default:	file file.cat

metrics:	file.M

file:	file.o hpux_rel.o
	$(CC) $(FLAGS) $(CFLAGS) $(LDFLAGS) file.o hpux_rel.o -o file

file.cat:	file.c
	$(FINDMSG) file.c > file.msg
	$(GENCAT) file.cat file.msg

file.M:	file.c hpux_rel.c
	$(METRICS) $(FLAGS) $(CFLAGS) file.c hpux_rel.c -o file.M

clean:
	rm -f *.o file.msg

clobber: clean
	rm -f file file.cat file.M

.c.o:
	$(CC) $(FLAGS) $(CFLAGS) -c $<
