#	Makefile	4.1	83/06/27
#
OBJS=	htonl.o htons.o ntohl.o ntohs.o
CPP=/lib/cpp

.s.o:
	${CPP} -E -DPROF $*.s | ${AS} -o $*.o ; ld -X -r $*.o ; mv a.out profiled/$*.o
	${CPP} -E $*.s | ${AS} -o $*.o ; ld -x -r $*.o ; mv a.out $*.o

.c.o:
	${CC} -p ${CFLAGS} -c $*.c ; ld -X -r $*.o ; mv a.out profiled/$*.o
	${CC} ${CFLAGS} -c $*.c ; ld -x -r $*.o ; mv a.out $*.o

all:	netlib netlib_p

netlib_p: ${OBJS}
	@echo "building profiled netlib_p"
	@cd profiled; ar cru ../netlib_p ${OBJS}

netlib: ${OBJS}
	@echo "buiding normal netlib"
	@ar cru netlib ${OBJS}

clean:
	rm -f ${OBJS} profiled/*.o \
		errs a.out core netlib netlib_p
