# C news local libc makefile - added by Ian Darwin
INCLUDE=../include
DEFINES=-I$(INCLUDE)
COPTS=-O # -g -p
CFLAGS=$(COPTS) $(DEFINES)
LINTFLAGS=-hau $(DEFINES)
# workaround for System V make bug
SHELL = /bin/sh

SRCS=closeall.c efopen.c error.c fgetmfs.c \
	nfclose.c \
	standard.c stdfdopen.c warning.c emalloc.c
OBJS = closeall.o efopen.o error.o fgetmfs.o getdate.o nfclose.o \
	standard.o stdfdopen.o warning.o emalloc.o

# RANLIB is ranlib on non-USG systems, echo on USG systems
RANLIB=ranlib
#RANLIB=echo

u:	$(OBJS)
	ar ruv ../libcnews.a $(OBJS)

all:	$(OBJS)

libc.a:	$(SRCS)
	$(CC) $(CFLAGS) -c $?
	ar ru $@ *.o
	rm *.o
	$(RANLIB) $@
lint:
	lint $(LINTFLAGS) $(SRCS)

clean:
	rm -f *.o *.a getdate.c y.*.h y.*.c
