# -*-makefile-*----------------------------------------------------------------
# $Id: lib_ar.in,v 1.12 1996/10/25 18:55:35 furnish Exp $
#
# Maurice LeBrun
# IFS, University of Texas at Austin
# 14-Jul-1994
#
# PLplot build rule for library under Unix.
# -----------------------------------------------------------------------------

# -----------------------------------------------------------------------------
# Set up inference rules appropriate for building archive libraries.
# -----------------------------------------------------------------------------

.cc$O:
	$(CXX) $(CXX_FLAGS) $<

.c$O:
	$(CC) $(CC_FLAGS) $<

.f$O:
	$(F77) $(F77_FLAGS) $<

# -----------------------------------------------------------------------------
# Library dependency list and targets
# -----------------------------------------------------------------------------

PLLIBS = $(PLLIB_AR)
MATLIBS	= $(MATLIB_AR)
CXXLIBS = $(CXXLIB_AR)

libs:	$(PLLIBS) $(MAT_BUILD) $(CXXLIBS)

$(PLLIB_AR):	$(LIB_OBJS)
	-$(RM) $(PLLIB_AR)
	@echo ""; echo "Building archive library"; echo ""
	$(ARLIB_BUILD) $(PLLIB_AR) $(LIB_OBJS)
	$(RANLIB) $(PLLIB_AR)
	@echo ""

$(MATLIB_AR): $(MAT_OBJS)
	-$(RM) $(MATLIB_AR)
	@echo ""; echo "Building archive library"; echo ""
	$(ARLIB_BUILD) $(MATLIB_AR) $(MAT_OBJS)
	$(RANLIB) $(MATLIB_AR)
	@echo ""

$(CXXLIB_AR): $(CXX_OBJS)
	-$(RM) $(CXXLIB_AR)
	@echo ""; echo "Building archive library"; echo ""
	$(ARLIB_BUILD) $(CXXLIB_AR) $(CXX_OBJS)
	$(RANLIB) $(CXXLIB_AR)
	@echo ""

# -----------------------------------------------------------------------------
# Sick hacks.
# -----------------------------------------------------------------------------

# Needs to be compiled using K&R C.

tcpip$O:
	$(OCC) $(CC_FLAGS) tcpip.c

