From 946c4b64ba07aa4632eff63df99703c7fcedf062 Mon Sep 17 00:00:00 2001 From: ca110us Date: Wed, 30 Mar 2022 14:39:03 +0800 Subject: [PATCH] modify README --- README.md | 11 +++++------ README_CN.md | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 934d88e..129ef50 100644 --- a/README.md +++ b/README.md @@ -107,12 +107,11 @@ db load succeed: 9263 ### Static build ```bash -sudo bash ./prepare.sh - -export CGO_CFLAGS="-g -Wall -I./clamav-mussels-cookbook/mussels/install/include" -export CGO_LDFLAGS="-L./clamav-mussels-cookbook/mussels/install/lib -lclamav_static -lbz2_static -lclammspack_static -lclamunrar_iface_static -lclamunrar_static -lcrypto -ljson-c -lpcre2-8 -lpcre2-posix -lssl -lxml2 -lz -lm -ldl -lstdc++" - -CGO_ENABLED=1 go build --ldflags '--extldflags "-static -fpic"' main.go +$ sudo bash ./prepare.sh +$ SRCDIR=$(pwd) +$ export CGO_CFLAGS="-g -Wall -I${SRCDIR}/clamav-mussels-cookbook/mussels/install/include" +$ export CGO_LDFLAGS="-L${SRCDIR}/clamav-mussels-cookbook/mussels/install/lib -lclamav_static -lbz2_static -lclammspack_static -lclamunrar_iface_static -lclamunrar_static -lcrypto -ljson-c -lpcre2-8 -lpcre2-posix -lssl -lxml2 -lz -lm -ldl -lstdc++" +$ CGO_ENABLED=1 go build --ldflags '--extldflags "-static -fpic"' main.go ``` diff --git a/README_CN.md b/README_CN.md index 0cc559b..e09494d 100644 --- a/README_CN.md +++ b/README_CN.md @@ -107,12 +107,11 @@ db load succeed: 9263 ### 静态编译 ```bash -sudo bash ./prepare.sh - -export CGO_CFLAGS="-g -Wall -I./clamav-mussels-cookbook/mussels/install/include" -export CGO_LDFLAGS="-L./clamav-mussels-cookbook/mussels/install/lib -lclamav_static -lbz2_static -lclammspack_static -lclamunrar_iface_static -lclamunrar_static -lcrypto -ljson-c -lpcre2-8 -lpcre2-posix -lssl -lxml2 -lz -lm -ldl -lstdc++" - -CGO_ENABLED=1 go build --ldflags '--extldflags "-static -fpic"' main.go +$ sudo bash ./prepare.sh +$ SRCDIR=$(pwd) +$ export CGO_CFLAGS="-g -Wall -I${SRCDIR}/clamav-mussels-cookbook/mussels/install/include" +$ export CGO_LDFLAGS="-L${SRCDIR}/clamav-mussels-cookbook/mussels/install/lib -lclamav_static -lbz2_static -lclammspack_static -lclamunrar_iface_static -lclamunrar_static -lcrypto -ljson-c -lpcre2-8 -lpcre2-posix -lssl -lxml2 -lz -lm -ldl -lstdc++" +$ CGO_ENABLED=1 go build --ldflags '--extldflags "-static -fpic"' main.go ``` ## 参考