#
# Author: Andrew D. Fernandes <mailto:andrew@cryptonym.com>
#         Cryptonym Corporation <http://www.cryptonym.com>
#

CC=gcc
CDEFS=-DTIME_TEST=1 -DDSA_SIZE=1024 -DECDSA_TYPE=1 -DMOD_TYPE=1 # -DM_DEBUG
COPTS=-g -O6 # -ggdb3 -O0
CPROF=# -pg # -ftest-coverage -fprofile-arcs # remember to set libs below
CLANG=-ansi -pedantic -Wall -Wno-long-long
CFLAGS=$(CLANG) -Impi -Lmpi $(CDEFS) $(COPTS) $(CPROF)
CLIBS=-lmpi -lutil # -lmpi_p -lutil_p # -lefence -lmpi_m -lutil_m

OBJ=ecdsa.o dsa.o projective.o affine.o mpi-extra.o test.o

default: clear clean test

test: $(OBJ)
	$(CC) $(CFLAGS) $(OBJ) $(CLIBS) -o test

clear:
	clear

clean:
	rm -f *.o *~ core gmon.out *.bb *.bbg *.da *.gcov test

edit:
	emacs Makefile *.c *.h &

