Skip to content

Commit

Permalink
feat(makefile): add release script
Browse files Browse the repository at this point in the history
  • Loading branch information
Lutymane committed Jun 30, 2023
1 parent 1c8fb0c commit a6bf5ac
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
OPENSSL_PATH=/home/ceo/src/openssl

build:
# source should go before libs, otherwise they are skipped
# -L/usr/local/lib64/
# -std=c++2a for string.endsWith
g++ main.cpp -std=c++2a -pthread -L/usr/local/lib64/ -lcrypto -o mars
g++ -std=c++2a main.cpp -pthread -L/usr/local/lib64/ -lcrypto -o mars

release:
# https://stackoverflow.com/a/21250906/14776286
# statically link libs + remove unused symbols
g++ -std=c++2a -O3 -fdata-sections -ffunction-sections main.cpp -pthread -static -L/usr/local/lib64/ -lcrypto -lz -ldl -o mars -Wl,--gc-sections -Wl,--strip-all

test:
g++ test.cpp -pthread -L/usr/local/lib64/ -lcrypto -o test-suite && ./test-suite

0 comments on commit a6bf5ac

Please sign in to comment.