include ../cpuopt.mk
CC=g++
CFLAGS=-O6 $(CPUOPT)
INCLDIR=../
LIBDIR=../lib
LIBNAME=prng
OBJS=sha1prng.o prng.o 
EXECUTABLES=
HEADERS=prng.hxx sha1prng.hxx sha1prng.asm

lib$(LIBNAME).a: 	$(OBJS)
	ar cr lib$(LIBNAME).a  $(OBJS) ; ranlib  lib$(LIBNAME).a

all:	lib$(LIBNAME).a $(EXECUTABLES)

sha1prng.o:	prng.hxx sha1prng.hxx sha1prng.asm sha1prng.cxx 
	$(CC) $(CFLAGS) -c sha1prng.cxx -I$(INCLDIR)

prng.o:	prng.hxx prng.cxx 
	$(CC) $(CFLAGS) -c prng.cxx -I$(INCLDIR)

install-lib:	lib$(LIBNAME).a
	cp lib$(LIBNAME).a $(LIBDIR)/lib$(LIBNAME).a

install-headers:
	for HFILE in $(HEADERS) ; \
	do  ( cp $$HFILE ../include/prng/ ) ; \
	done

install:	install-lib install-headers

clean:
	rm -f *~ *.o core lib$(LIBNAME).a $(EXECUTABLES)

dist-clean:	clean 
