Blame patches/bearssl-0.6.local.patch

398a1e
diff -ru bearssl-0.6.orig/conf/Unix.mk bearssl-0.6/conf/Unix.mk
398a1e
--- bearssl-0.6.orig/conf/Unix.mk	2018-08-14 22:41:54.000000000 +0200
398a1e
+++ bearssl-0.6/conf/Unix.mk	2021-11-19 11:37:24.523722697 +0100
398a1e
@@ -38,7 +38,7 @@
398a1e
 
398a1e
 # C compiler and flags.
398a1e
 CC = cc
398a1e
-CFLAGS = -W -Wall -Os -fPIC
398a1e
+CFLAGS ?= -W -Wall -Os -fPIC
398a1e
 CCOUT = -c -o 
398a1e
 
398a1e
 # Static library building tool.
398a1e
@@ -47,12 +47,12 @@
398a1e
 AROUT =
398a1e
 
398a1e
 # DLL building tool.
398a1e
-LDDLL = cc
398a1e
+LDDLL = $(CC)
398a1e
 LDDLLFLAGS = -shared
398a1e
 LDDLLOUT = -o 
398a1e
 
398a1e
 # Static linker.
398a1e
-LD = cc
398a1e
+LD = $(CC)
398a1e
 LDFLAGS = 
398a1e
 LDOUT = -o 
398a1e
 
398a1e
@@ -67,3 +67,18 @@
398a1e
 #DLL = no
398a1e
 #TOOLS = no
398a1e
 #TESTS = no
398a1e
+
398a1e
+INSTALL ?= install
398a1e
+PREFIX ?= 
398a1e
+BINDIR ?= $(PREFIX)/bin
398a1e
+LIBDIR ?= $(PREFIX)/lib
398a1e
+INCDIR ?= $(PREFIX)/include
398a1e
+
398a1e
+install: build/brssl build/libbearssl.so build/libbearssl.a
398a1e
+		$(MKDIR) $(DESTDIR)$(BINDIR)
398a1e
+		$(MKDIR) $(DESTDIR)$(LIBDIR)
398a1e
+		$(MKDIR) $(DESTDIR)$(INCDIR)
398a1e
+		$(INSTALL) -c -m 0755 build/brssl $(DESTDIR)$(BINDIR)/brssl
398a1e
+		$(INSTALL) -c -m 0755 build/libbearssl.so $(DESTDIR)$(LIBDIR)/libbearssl.so
398a1e
+		$(INSTALL) -c -m 0644 build/libbearssl.a $(DESTDIR)$(LIBDIR)/libbearssl.a
398a1e
+		$(INSTALL) -c -m 0644 inc/*.h $(DESTDIR)$(INCDIR)/