Lines 1-5
Link Here
|
1 |
--- Makefile.orig 2023-04-08 21:36:58 UTC |
1 |
--- Makefile.orig 2023-11-14 21:36:52.000000000 +0000 |
2 |
+++ Makefile |
2 |
+++ Makefile 2023-11-20 13:57:16.349229000 +0000 |
3 |
@@ -1,12 +1,7 @@ |
3 |
@@ -1,12 +1,7 @@ |
4 |
# set gcc as default if CC is not set |
4 |
# set gcc as default if CC is not set |
5 |
|
5 |
|
Lines 14-20
Link Here
|
14 |
# Detect OS |
14 |
# Detect OS |
15 |
OS := $(shell uname) |
15 |
OS := $(shell uname) |
16 |
ARCH := $(shell uname -m) |
16 |
ARCH := $(shell uname -m) |
17 |
@@ -26,11 +21,11 @@ endif |
17 |
@@ -26,11 +21,11 @@ |
18 |
|
18 |
|
19 |
SRCS = sslscan.c |
19 |
SRCS = sslscan.c |
20 |
BINDIR = $(PREFIX)/bin |
20 |
BINDIR = $(PREFIX)/bin |
Lines 28-34
Link Here
|
28 |
|
28 |
|
29 |
# for dynamic linking |
29 |
# for dynamic linking |
30 |
LIBS = -lssl -lcrypto |
30 |
LIBS = -lssl -lcrypto |
31 |
@@ -58,36 +53,12 @@ endif |
31 |
@@ -58,38 +53,12 @@ |
32 |
CFLAGS += -std=gnu11 |
32 |
CFLAGS += -std=gnu11 |
33 |
|
33 |
|
34 |
# for static linking |
34 |
# for static linking |
Lines 61-72
Link Here
|
61 |
-ifneq (,$(wildcard /usr/bin/nproc)) |
61 |
-ifneq (,$(wildcard /usr/bin/nproc)) |
62 |
- NUM_PROCS = `/usr/bin/nproc --all` |
62 |
- NUM_PROCS = `/usr/bin/nproc --all` |
63 |
-endif |
63 |
-endif |
|
|
64 |
-ifeq ($(OS), Darwin) |
65 |
- NUM_PROCS = `sysctl -n hw.ncpu` |
66 |
-endif |
64 |
- |
67 |
- |
65 |
- |
|
|
66 |
.PHONY: all sslscan clean install uninstall static opensslpull |
68 |
.PHONY: all sslscan clean install uninstall static opensslpull |
67 |
|
69 |
|
68 |
all: sslscan |
70 |
all: sslscan |
69 |
@@ -114,6 +85,9 @@ ifeq ($(OS), Darwin) |
71 |
@@ -116,6 +85,9 @@ |
70 |
install sslscan $(DESTDIR)$(BINDIR)/sslscan; |
72 |
install sslscan $(DESTDIR)$(BINDIR)/sslscan; |
71 |
install -d $(DESTDIR)$(MAN1DIR)/; |
73 |
install -d $(DESTDIR)$(MAN1DIR)/; |
72 |
install sslscan.1 $(DESTDIR)$(MAN1DIR)/sslscan.1; |
74 |
install sslscan.1 $(DESTDIR)$(MAN1DIR)/sslscan.1; |
Lines 76-95
Link Here
|
76 |
else |
78 |
else |
77 |
install -D sslscan $(DESTDIR)$(BINDIR)/sslscan; |
79 |
install -D sslscan $(DESTDIR)$(BINDIR)/sslscan; |
78 |
install -D sslscan.1 $(DESTDIR)$(MAN1DIR)/sslscan.1; |
80 |
install -D sslscan.1 $(DESTDIR)$(MAN1DIR)/sslscan.1; |
79 |
@@ -126,11 +100,7 @@ uninstall: |
81 |
@@ -128,11 +100,7 @@ |
80 |
.openssl.is.fresh: opensslpull |
82 |
.openssl.is.fresh: opensslpull |
81 |
true |
83 |
true |
82 |
opensslpull: |
84 |
opensslpull: |
83 |
- if [ -d openssl -a -d openssl/.git ]; then \ |
85 |
- if [ -d openssl -a -d openssl/.git ]; then \ |
84 |
- cd ./openssl && git checkout OpenSSL_1_1_1-stable && git pull | grep -q "Already up-to-date." && [ -e ../.openssl.is.fresh ] || touch ../.openssl.is.fresh ; \ |
86 |
- cd ./openssl && git checkout `git ls-remote https://github.com/openssl/openssl | grep -Eo '(openssl-3\.0\.[0-9]+)' | sort --version-sort | tail -n 1` && git pull | grep -q "Already up-to-date." && [ -e ../.openssl.is.fresh ] || touch ../.openssl.is.fresh ; \ |
85 |
- else \ |
87 |
- else \ |
86 |
- git clone --depth 1 -b OpenSSL_1_1_1-stable https://github.com/openssl/openssl ./openssl && cd ./openssl && touch ../.openssl.is.fresh ; \ |
88 |
- git clone --depth 1 -b `git ls-remote https://github.com/openssl/openssl | grep -Eo '(openssl-3\.0\.[0-9]+)' | sort -V | tail -n 1` https://github.com/openssl/openssl ./openssl && cd ./openssl && touch ../.openssl.is.fresh ; \ |
87 |
- fi |
89 |
- fi |
88 |
+ true |
90 |
+ true |
89 |
|
91 |
|
90 |
# Need to build OpenSSL differently on OSX |
92 |
# Need to build OpenSSL differently on OSX |
91 |
ifeq ($(OS), Darwin) |
93 |
ifeq ($(OS), Darwin) |
92 |
@@ -144,16 +114,15 @@ openssl/Makefile: .openssl.is.fresh |
94 |
@@ -146,16 +114,15 @@ |
93 |
# Any other *NIX platform |
95 |
# Any other *NIX platform |
94 |
else |
96 |
else |
95 |
openssl/Makefile: .openssl.is.fresh |
97 |
openssl/Makefile: .openssl.is.fresh |
Lines 99-108
Link Here
|
99 |
|
101 |
|
100 |
openssl/libcrypto.a: openssl/Makefile |
102 |
openssl/libcrypto.a: openssl/Makefile |
101 |
- $(MAKE) -j $(NUM_PROCS) -C openssl depend |
103 |
- $(MAKE) -j $(NUM_PROCS) -C openssl depend |
102 |
- $(MAKE) -j $(NUM_PROCS) -C openssl all |
104 |
- $(MAKE) -j $(NUM_PROCS) -C openssl build_libs |
103 |
-# $(MAKE) -j $(NUM_PROCS) -C openssl test # Disabled because this takes 45+ minutes for OpenSSL v1.1.1. |
105 |
-# $(MAKE) -j $(NUM_PROCS) -C openssl test # Disabled because this takes 45+ minutes for OpenSSL v1.1.1. |
104 |
+ $(MAKE) -C openssl depend |
106 |
+ $(MAKE) -C openssl depend |
105 |
+ $(MAKE) -C openssl build_sw |
107 |
+ $(MAKE) -C openssl build_libs |
106 |
|
108 |
|
107 |
static: openssl/libcrypto.a |
109 |
static: openssl/libcrypto.a |
108 |
- $(MAKE) -j $(NUM_PROCS) sslscan STATIC_BUILD=TRUE |
110 |
- $(MAKE) -j $(NUM_PROCS) sslscan STATIC_BUILD=TRUE |