summaryrefslogtreecommitdiff
path: root/security/HElib/patches/patch-Makefile
blob: e27ff37fbe451a75c3aed272ac4063fead27074f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
$NetBSD: patch-Makefile,v 1.2 2014/09/24 12:39:28 jperkin Exp $

adapt for pkgsrc
add an install target

--- Makefile.orig	2013-04-30 21:31:26.000000000 +0000
+++ Makefile
@@ -16,7 +16,7 @@
 CC = g++
 #CFLAGS = -g -Wall -O3 -I/usr/local/include
 #CFLAGS = -g -Wall -I/usr/local/include
-CFLAGS = -g -O2 -Wfatal-errors -Wshadow -Wall -I/usr/local/include 
+CFLAGS = -g -Wall -O2 -I${PREFIX}/include
 #CFLAGS = -pg -Wall -I/usr/local/include
 LD = g++
 
@@ -41,12 +41,12 @@ TESTPROGS = Test_General_x Test_Replicat
 all: fhe.a
 
 check: Test_General_x
-	Test_General_x R=1 k=10 p=2 r=1 d=1
-	Test_General_x R=1 k=10 p=2 r=2 d=1
-	Test_General_x R=1 k=10 p=2 r=1 d=2
-	Test_General_x R=1 k=10 p=3 r=1 d=1
-	Test_General_x R=1 k=10 p=3 r=2 d=1
-	Test_General_x R=1 k=10 p=3 r=1 d=2
+	env LD_LIBRARY_PATH=${PREFIX}/lib Test_General_x R=1 k=10 p=2 r=1 d=1
+	env LD_LIBRARY_PATH=${PREFIX}/lib Test_General_x R=1 k=10 p=2 r=2 d=1
+	env LD_LIBRARY_PATH=${PREFIX}/lib Test_General_x R=1 k=10 p=2 r=1 d=2
+	env LD_LIBRARY_PATH=${PREFIX}/lib Test_General_x R=1 k=10 p=3 r=1 d=1
+	env LD_LIBRARY_PATH=${PREFIX}/lib Test_General_x R=1 k=10 p=3 r=2 d=1
+	env LD_LIBRARY_PATH=${PREFIX}/lib Test_General_x R=1 k=10 p=3 r=1 d=2
 
 test: $(TESTPROGS)
 
@@ -64,3 +64,10 @@ fhe.a: $(OBJ)
 clean:
 	rm -f *.o *_x *_x.exe *.a core.*
 	rm -rf *.dSYM
+
+install:
+	${BSD_INSTALL_LIB} fhe.a ${DESTDIR}${PREFIX}/lib/libfhe.a
+	${BSD_INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/FHE
+	for h in ${HEADER}; do						\
+		${BSD_INSTALL_DATA} $$h ${DESTDIR}${PREFIX}/FHE/$$h;	\
+	done