]> git.pld-linux.org Git - packages/libargon2.git/blob - makefile.patch
make symlink patch install re-entrant
[packages/libargon2.git] / makefile.patch
1 --- phc-winner-argon2-20161029/Makefile 2016-10-29 12:24:03.000000000 +0300
2 +++ phc-winner-argon2-20161029/Makefile 2017-08-23 08:59:46.258100103 +0300
3 @@ -27,12 +27,12 @@
4  SRC_GENKAT = src/genkat.c
5  OBJ = $(SRC:.c=.o)
6  
7 -CFLAGS += -std=c89 -pthread -O3 -Wall -g -Iinclude -Isrc
8 +CFLAGS += -std=c89 -pthread -Wall -Iinclude -Isrc
9  CI_CFLAGS := $(CFLAGS) -Werror=declaration-after-statement -D_FORTIFY_SOURCE=2 \
10                                 -Wextra -Wno-type-limits -Werror -coverage -DTEST_LARGE_RAM
11  
12  OPTTARGET ?= native
13 -OPTTEST := $(shell $(CC) -Iinclude -Isrc -march=$(OPTTARGET) src/opt.c -c \
14 +OPTTEST := $(shell $(CC) -Iinclude -Isrc src/opt.c -c \
15                         -o /dev/null 2>/dev/null; echo $$?)
16  # Detect compatible platform
17  ifneq ($(OPTTEST), 0)
18 @@ -40,7 +40,7 @@
19         SRC += src/ref.c
20  else
21  $(info Building with optimizations for $(OPTTARGET))
22 -       CFLAGS += -march=$(OPTTARGET)
23 +       
24         SRC += src/opt.c
25  endif
26  
27 @@ -87,5 +87,6 @@
28  endif
29  
30  LIB_SH := lib$(LIB_NAME).$(LIB_EXT)
31 +LIB_SH_VERSION := $(LIB_SH).0
32  LIB_ST := lib$(LIB_NAME).a
33  LIBRARIES = $(LIB_SH) $(LIB_ST)
34 @@ -105,7 +106,7 @@
35  
36  .PHONY: clean dist format $(GENKAT) all install
37  
38 -all: clean $(RUN) libs 
39 +all: $(RUN) libs 
40  libs: $(LIBRARIES)
41  
42  $(RUN):                $(SRC) $(SRC_RUN)
43 @@ -160,2 +161,6 @@
44         $(INSTALL) -d $(INST_BINARY)
45         $(INSTALL) $(RUN) $(INST_BINARY)
46 +       # rename library to match SONAME
47 +       mv $(INST_LIBRARY)/$(LIB_SH) $(INST_LIBRARY)/$(LIB_SH_VERSION)
48 +       # keep symlink for development
49 +       ln -sf $(LIB_SH_VERSION) $(INST_LIBRARY)/$(LIB_SH)
This page took 0.038646 seconds and 3 git commands to generate.