#
# PCR lower-level makefile for libraries
#
#   This should go away when dynamic loading learns to search libraries.
#
# Demers, November 1, 1988 5:26:52 pm PST
#

#
# READ the comments in makefile.common!
#

INCLUDE =
BIN = 
OBJ = 
LIB = libxrc.a libxrpixrect.a
LIBA = 
MAKE_DEPEND_SRC =


include makefile.config
include ../makefile.common

#
# targets
#

notarget: ${BIN} ${OBJ} ${LIB} ${LIBA}
	
libxrc.a: ../LIB/${CONFIG_DIR}/XRRoot.o ../LIB/${CONFIG_DIR}/xr.a
	ld -o temp.o -Bstatic ../LIB/${CONFIG_DIR}/XRRoot.o \
		../LIB/${CONFIG_DIR}/xr.a -lg -lc
	nm -p temp.o | grep -v 'ptr_call.o' | grep '\.o' \
		| awk '{print $$3}' > temp.included-from-library
	cp /lib/libc.a libxrc.a
	@echo Messages '*** Error code 1 (ignored)' are ok.
	-ar d libxrc.a `cat temp.included-from-library` \
		calloc.o cerror.o doprnt.o errno.o malloc.o \
		sprintf.o valloc.o 2>&1 \
		| grep -v '.o not found'
	ranlib libxrc.a
	rm -f temp.o temp.included-from-library


libxrpixrect.a: /usr/lib/libpixrect.a
	cp -p /usr/lib/libpixrect.a libxrpixrect.a





