CFLAGS = -I. -I../include -I./crypto/bignum/h -I./crypto/algorithm -I/usr/athena/include

OBJS = gdss.o rgdss.o
COBJS = crypto/hashes.o crypto/read_password.o crypto/crypto_util.o \
	crypto/dumphex.o crypto/read_privkey.o crypto/read_pubkey.o \
	crypto/write_pubkey.o crypto/KeyFromPQ.o
BOBJS = crypto/bignum/o/*
AOBJS = crypto/algorithm/random.o crypto/algorithm/random_BigNum.o \
	crypto/algorithm/bigrsacode.o crypto/algorithm/bigkeygen.o \
	crypto/algorithm/bigsignverify.o

all: subdirs libgdss.a

subdirs:
	cd crypto/algorithm; make
	cd crypto/bignum; make mips
	cd crypto; make

gdss.o: gdss.c
rgdss.o: rgdss.c

libgdss.a: $(OBJS) $(COBJS) $(BOBJS) $(AOBJS)
	ar cru libgdss.a $(OBJS) $(COBJS) $(BOBJS) $(AOBJS)
	ranlib libgdss.a
