#-----------------------------------------------------------------------------
#
# make libs	- build library routines and install them in ../lib/libC.a
#
#-----------------------------------------------------------------------------

CFLAGS = $(RCC_CFLAGS)

OBJS = 	binsearch.o \
	copyof.o \
	cputime.o \
	errorstr.o \
	hash.o \
	heapsort.o \
	nap.o \
	read_timeout.o \
	signame.o \
	testchar.o \
	fatal.o \
	snprintf.o \
	random.o \
	timeval.o \
	run.o \
	strtoX.o

#ifdef uVaxConfig
ALLOBJS = $(OBJS) syscalls.o
#else
#if VxWorksConfig
ALLOBJS = $(OBJS) unixFxns.o atan2.o
/* run.o function seems to be fusy about *not* being compiled with float */
run.o:	run.c
	$(CC) -c $(C_INCS) $(C_DEFS) $<
#else
ALLOBJS = $(OBJS)
#endif
#endif

libs:   ../lib/libC.a

#ifndef VxWorksConfig
buildLibrary(../lib/libC.a,$(ALLOBJS))
#else
VXWLO = $(ALLOBJS)
maintainVxwLibs(vxwLibC,vxlibs)
#endif

#ifdef uVaxConfig
syscalls.o: syscalls_uVAX.s SYS.h syscall.h
	/lib/cpp syscalls_uVAX.s | as -o syscalls.o
	ld -x -r syscalls.o
	rm -f syscalls.o
	mv a.out syscalls.o
#endif

makeClean()
makeDepend()
maintainVxwSubdir()
