diff --git a/Makefile.am b/Makefile.am index c03a854..1a0e7a5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,6 @@ -SUBDIRS = external/openssl src man - -# Set of files to be formatted. +# Set of files to be formatted FORMATSOURCES = src/*.c src/*.h + format: clang-format -i -style=file $(FORMATSOURCES) @@ -9,17 +8,17 @@ check-format: clang-format -i -style=file $(FORMATSOURCES) && git diff --exit-code # Add a rule to build OpenSSL first -all: build-openssl $(SUBDIRS) +all: build-openssl build-openssl: cd external/openssl && ./Configure linux-x86_64 no-shared no-comp no-engine no-md4 no-md2 no-ripemd no-whirlpool \ - no-dsa no-dh no-ec no-ecdsa no-ecdh no-sm2 no-sm3 no-sm4 no-aria \ - no-cast no-camellia no-seed no-rc2 no-rc4 no-rc5 no-des no-blake2 no-poly1305 \ - no-chacha no-scrypt no-siphash no-ssl no-tls no-tls1 no-tls1_1 no-tls1_2 no-tls1_3 \ - no-dtls no-dtls1 no-dtls1_2 no-nextprotoneg no-ocsp no-srp no-srtp no-psk \ - no-deprecated no-legacy no-tests no-shared no-dso no-async no-atexit no-autoalginit \ - no-autoload-config no-static-engine no-ui-console no-filenames \ - --prefix=$(abs_top_srcdir)/external/openssl/build && make && make install_sw - - + no-dsa no-dh no-ec no-ecdsa no-ecdh no-sm2 no-sm3 no-sm4 no-aria \ + no-cast no-camellia no-seed no-rc2 no-rc4 no-rc5 no-des no-blake2 no-poly1305 \ + no-chacha no-scrypt no-siphash no-ssl no-tls no-tls1_1 no-tls1_2 no-tls1_3 \ + no-dtls no-dtls1 no-dtls1_2 no-nextprotoneg no-ocsp no-srp no-srtp no-psk \ + no-deprecated no-legacy no-tests no-shared no-dso no-async no-atexit no-autoalginit \ + no-autoload-config no-static-engine no-ui-console no-filenames \ + --prefix=$(abs_top_srcdir)/external/openssl/build && make -j$(shell nproc) && make install_sw +$(SUBDIRS): + $(MAKE) -C $@ -j$(NUM_PROCS) diff --git a/src/Makefile.am b/src/Makefile.am index 559636d..3c2bc41 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,5 @@ # Include directories and linker flags for OpenSSL -AM_CFLAGS = -I$(top_srcdir)/external/openssl/build/include +AM_CFLAGS = -I$(top_srcdir)/external/openssl/build/include -Wl,--gc-sections -flto -Os -s -fno-ident AM_LDFLAGS = -L$(top_srcdir)/external/openssl/build/lib64 -l:libssl.a -l:libcrypto.a # List of binaries to be built