Marcus Meissner
c9aff16c01
I'd like to maintain argon2 in Factory. Please accept and set me as the maintainer. OBS-URL: https://build.opensuse.org/request/show/447165 OBS-URL: https://build.opensuse.org/package/show/security/argon2?expand=0&rev=1
67 lines
2.0 KiB
Diff
67 lines
2.0 KiB
Diff
Index: phc-winner-argon2-20161029/Makefile
|
|
===================================================================
|
|
--- phc-winner-argon2-20161029.orig/Makefile
|
|
+++ phc-winner-argon2-20161029/Makefile
|
|
@@ -21,28 +21,14 @@ GENKAT = genkat
|
|
|
|
DIST = phc-winner-argon2
|
|
|
|
-SRC = src/argon2.c src/core.c src/blake2/blake2b.c src/thread.c src/encoding.c
|
|
+SRC = src/argon2.c src/core.c src/blake2/blake2b.c src/thread.c src/encoding.c src/opt.c
|
|
SRC_RUN = src/run.c
|
|
SRC_BENCH = src/bench.c
|
|
SRC_GENKAT = src/genkat.c
|
|
OBJ = $(SRC:.c=.o)
|
|
|
|
-CFLAGS += -std=c89 -pthread -O3 -Wall -g -Iinclude -Isrc
|
|
-CI_CFLAGS := $(CFLAGS) -Werror=declaration-after-statement -D_FORTIFY_SOURCE=2 \
|
|
- -Wextra -Wno-type-limits -Werror -coverage -DTEST_LARGE_RAM
|
|
-
|
|
-OPTTARGET ?= native
|
|
OPTTEST := $(shell $(CC) -Iinclude -Isrc -march=$(OPTTARGET) src/opt.c -c \
|
|
-o /dev/null 2>/dev/null; echo $$?)
|
|
-# Detect compatible platform
|
|
-ifneq ($(OPTTEST), 0)
|
|
-$(info Building without optimizations)
|
|
- SRC += src/ref.c
|
|
-else
|
|
-$(info Building with optimizations for $(OPTTARGET))
|
|
- CFLAGS += -march=$(OPTTARGET)
|
|
- SRC += src/opt.c
|
|
-endif
|
|
|
|
BUILD_PATH := $(shell pwd)
|
|
KERNEL_NAME := $(shell uname -s)
|
|
@@ -88,7 +74,7 @@ endif
|
|
|
|
LIB_SH := lib$(LIB_NAME).$(LIB_EXT)
|
|
LIB_ST := lib$(LIB_NAME).a
|
|
-LIBRARIES = $(LIB_SH) $(LIB_ST)
|
|
+LIBRARIES = $(LIB_SH)
|
|
HEADERS = include/argon2.h
|
|
|
|
INSTALL = install
|
|
@@ -105,11 +91,11 @@ INST_BINARY = $(DESTDIR)$(PREFIX)/$(BINA
|
|
|
|
.PHONY: clean dist format $(GENKAT) all install
|
|
|
|
-all: clean $(RUN) libs
|
|
+all: $(RUN) libs
|
|
libs: $(LIBRARIES)
|
|
|
|
$(RUN): $(SRC) $(SRC_RUN)
|
|
- $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
|
|
+ $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
|
|
|
|
$(BENCH): $(SRC) $(SRC_BENCH)
|
|
$(CC) $(CFLAGS) $^ -o $@
|
|
@@ -118,7 +104,7 @@ $(GENKAT): $(SRC) $(SRC_GENKAT)
|
|
$(CC) $(CFLAGS) $^ -o $@ -DGENKAT
|
|
|
|
$(LIB_SH): $(SRC)
|
|
- $(CC) $(CFLAGS) $(LIB_CFLAGS) $(LDFLAGS) $(SO_LDFLAGS) $^ -o $@
|
|
+ $(CC) $(CFLAGS) $(LIB_CFLAGS) $(SO_LDFLAGS) $^ -o $@ $(LDFLAGS)
|
|
|
|
$(LIB_ST): $(OBJ)
|
|
ar rcs $@ $^
|