| … | … | @@ -47,10 +47,18 @@ echo "Building transport..." |
| 47 | 47 | TOBJ=${TOBJ:-/tmp/hsp-obj} |
| 48 | 48 | PEERSRC="noise_ik noise_handshake noise_stream dht_rpc holepuncher hyperdht dht_connector udx_transport swarm_manager protomux" |
| 49 | 49 | TLIBS="" |
| 50 | # ⛔ AGAINST THE NEWEST HEADER, NOT THE .cpp. This compared each object with its |
| 51 | # own source only, so a change to a shared HEADER — a class layout, or |
| 52 | # compact_encoding.h growing a new dependency — left every object here stale and |
| 53 | # silently reusable. That is the half-updated cache ../daemon/build.sh already |
| 54 | # refuses to link, and it was reachable from this script. |
| 55 | PEERNEW=$(ls -t "$PEER"/src/*.h "$PEER"/src/*.cpp | head -1) |
| 50 | 56 | for n in $PEERSRC; do |
| 51 | 57 | o="$OBJ/peer_$n.o" |
| 52 | | if [ ! -f "$o" ] || [ "$PEER/src/$n.cpp" -nt "$o" ]; then |
| 53 | | g++ -std=c++17 -O2 -D_GNU_SOURCE -I$PEER/src -I$PEER/thirdparty/libudx/include -c -o "$o" "$PEER/src/$n.cpp" |
| 58 | if [ ! -f "$o" ] || [ "$PEERNEW" -nt "$o" ]; then |
| 59 | g++ -std=c++17 -O2 -D_GNU_SOURCE -I$PEER/src -I$PEER/thirdparty/libudx/include \ |
| 60 | -I$KB/tier5/libcompact/include -I$KB/tier4/libutf/include \ |
| 61 | -c -o "$o" "$PEER/src/$n.cpp" |
| 54 | 62 | fi |
| 55 | 63 | TLIBS="$TLIBS $o" |
| 56 | 64 | done |