File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 16
16
all : s2nc s2nd
17
17
include ../s2n.mk
18
18
19
- LDFLAGS += -L../lib/ -ls2n -lcrypto
19
+ ifeq ($(shell uname) ,Darwin)
20
+ LIBS = -lcrypto
21
+ else
22
+ LIBS = -lcrypto -lrt
23
+ endif
24
+
25
+ LDFLAGS += -L../lib/ -ls2n ${LIBS}
20
26
CRUFT += s2nc s2nd
21
27
22
28
s2nc : s2nc.c echo.c
Original file line number Diff line number Diff line change @@ -22,10 +22,16 @@ include ../../s2n.mk
22
22
23
23
CRUFT += $(wildcard * _test)
24
24
25
+ ifeq ($(shell uname) ,Darwin)
26
+ LIBS = -lcrypto -lpthread -lm
27
+ else
28
+ LIBS = -lcrypto -lpthread -lm -lrt
29
+ endif
30
+
25
31
# Suppress the unreachable code warning, because tests involve what should be
26
32
# unreachable code
27
33
CFLAGS += -Wno-unreachable-code -I../../ -I../../api/
28
- LDFLAGS += -L../../lib/ -L../testlib/ -ltests2n -ls2n -lcrypto -lpthread -lm
34
+ LDFLAGS += -L../../lib/ -L../testlib/ -ltests2n -ls2n ${LIBS}
29
35
30
36
run_tests : build_tests
31
37
(for test in * _test ; do DYLD_LIBRARY_PATH=" ../../lib/:../testlib/:$$ DYLD_LIBRARY_PATH" LD_LIBRARY_PATH=" ../../lib/:../testlib/:$$ LD_LIBRARY_PATH" ./$$ test || exit 1 ; done )
You can’t perform that action at this time.
0 commit comments