aboutsummaryrefslogtreecommitdiff
path: root/test/src
diff options
context:
space:
mode:
Diffstat (limited to 'test/src')
-rw-r--r--test/src/Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/src/Makefile b/test/src/Makefile
new file mode 100644
index 0000000..e22dcd3
--- /dev/null
+++ b/test/src/Makefile
@@ -0,0 +1,27 @@
+####
+#
+# ecgen, tool for generating Elliptic curve domain parameters
+# Copyright (C) 2017 J08nY
+#
+####
+
+
+CC ?= gcc
+CFLAGS = -Wall -g -O0
+LDFLAGS = -L../../lib/parson -L../../lib/sha1 -L../../lib/pari -L../lib/criterion/build
+INCLUDES = -I. -I../../lib -I../lib/criterion/include
+LIBS = -lrt -lpari -lpthread -lparson -lsha1 -lcriterion
+
+TEST_SRC = $(wildcard *.c) $(wildcard */*.c)
+TEST_OBJ = $(patsubst %.c,%.o, $(TEST_SRC))
+TESTS = $(patsubst %.c,%, $(TEST_SRC))
+
+all: test_ecgen
+ LD_LIBRARY_PATH=../lib/criterion/build ./test_ecgen
+
+test_ecgen: $(TEST_OBJ)
+ $(CC) $(CFLAGS) $(INCLUDES) -o $@ $^ $(LDFLAGS) $(LIBS)
+
+%.o: %.c
+ $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
+