VPATH=@srcdir@
srcdir=@srcdir@
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
datadir=@datadir@
includedir=@includedir@
infodir=@infodir@
libdir=@libdir@
libexecdir=@libexecdir@
localstatedir=@localstatedir@
mandir=@mandir@
sbindir=@sbindir@
sharedstatedir=@sharedstatedir@
sysconfdir=@sysconfdir@


SHELL=	/bin/sh
CC=	@CC@
INSTALL=@INSTALL@

DEFS=	@DEFS@
all:	libusp.a

SRCS=	usp.c # block.c get.c internal.c main.c put.c usp_et.et
INCS=	notice.h gen.h
INCLUDES=  -I../include -I$(srcdir) -I$(srcdir)/../include
CFLAGS= -O $(INCLUDES)

libusp.a: usp_et.o usp.o #../include/usp.h gen.h main.o block.o get.o put.o internal.o
	ar r libusp.a usp_et.o usp.o
	@RANLIB@ libusp.a
# main.o block.o get.o put.o internal.o

install:

clean:
	rm -f *.o libusp.a *~ core

dist:	$(SRCS) $(INCLUDES) Makefile
	-mkdir ../../dist/source/usp
	-chmod g+w ../../dist/source/usp
	cp -p $(SRCS) ../../dist/source/usp/
	cp -p $(INCS) ../../dist/source/usp/
	cp -p Makefile ../../dist/source/usp/
	chmod 644 ../../dist/source/usp/Makefile
	cp -p usp_et.et ../../dist/source/usp/

.SUFFIXES:	.h

usp_et.o : usp_et.c

usp_et.c: ../ets/usp_et.et
	../utils/et/compile_et $(srcdir)/../ets/usp_et.et; rm usp_et.h

.et.h:
	rm -f $*.o $*.h
	../utils/et/compile_et $*.et

usp.o: usp.c
