summaryrefslogtreecommitdiff
path: root/security/lua-argon2/files/patch-Makefile
blob: afe585237143dd8c70fad44a83ed98cb5332e829 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- Makefile.orig	2018-06-11 02:10:23 UTC
+++ Makefile
@@ -1,8 +1,7 @@
 LIB_NAME = argon2

-CC      ?= gcc
-LDFLAGS ?= -shared
-CFLAGS  ?= -O2 -fPIC -ansi -Wall -Werror -Wpedantic
+LDFLAGS += -shared
+CFLAGS  += -fPIC -std=c11 -Wall -Wpedantic

 PREFIX        ?= /usr/local
 ARGON2_INCDIR ?= $(PREFIX)/include
@@ -17,7 +16,7 @@ BUILD_LDFLAGS = -L$(ARGON2_LIBDIR) -largon2
 all: $(LIB_NAME).so

 $(LIB_NAME).so: $(LIB_NAME).o
-	$(CC) $(LDFLAGS) -o $@ $< $(BUILD_LDFLAGS)
+	$(CC) $(LDFLAGS) -o $@ $(LIB_NAME).o $(BUILD_LDFLAGS)

 $(LIB_NAME).o: src/$(LIB_NAME).c
	$(CC) $(CFLAGS) -c $< -o $@ $(BUILD_CFLAGS)