优化Makefile

This commit is contained in:
aixiao 2023-01-15 11:02:57 +08:00
parent e424cc1c04
commit 7478732ed8

View File

@ -25,10 +25,10 @@ ip2region_CFLAGS += -Os -g -Wall -I/ip2region -c
ip2region_LIB += ip2region.o xdb_searcher.o ip2region_LIB += ip2region.o xdb_searcher.o
CLAMAV_CFLAGS += -DHAVE_CONFIG_H -I./clamav/libclamav -I./clamav/ -I./clamav/libclamunrar_iface -I./clamav/common -isystem ./clamav/ -isystem /usr/include/libxml2 -isystem /usr/include/json-c -fPIE -Wall -Wextra -Wformat-security -std=gnu90 CLAMAV_CFLAGS += -DHAVE_CONFIG_H -I./clamav/libclamav -I./clamav/ -I./clamav/libclamunrar_iface -I./clamav/common -isystem ./clamav/ -isystem /usr/include/libxml2 -isystem /usr/include/json-c -fPIE -Wall -Wextra -Wformat-security -std=gnu90
CLAMAV_LIB += ./clamav/clamscan/clamscan.c.o ./clamav/clamscan/manager.c.o ./clamav/libcommon.a -Wl,-rpath,$${PWD}/clamav $${PWD}/clamav/libclamav.so.11.0.0 -lmspack ./clamav/libclamav_rust/x86_64-unknown-linux-gnu/debug/libclamav_rust.a -lgcc_s -lutil -lrt -lpthread -lm -ldl -lc -lbz2 -lpcre2-8 -lxml2 -ljson-c -lc -ldl -lm -lssl -lcrypto -lz -lcurl -lsystemd CLAMAV_LIB += ./clamav/clamscan/clamscan.c.o ./clamav/clamscan/manager.c.o ./clamav/libcommon.a -Wl,-rpath,/lib /lib/clamav/libclamav.so.11.0.0 -lmspack ./clamav/libclamav_rust/x86_64-unknown-linux-gnu/debug/libclamav_rust.a -lgcc_s -lutil -lrt -lpthread -lm -ldl -lc -lbz2 -lpcre2-8 -lxml2 -ljson-c -lc -ldl -lm -lssl -lcrypto -lz -lcurl -lsystemd
FRESHCLAM_CFLAGS += -DHAVE_CONFIG_H -I./clamav/libfreshclam -I./clamav/common -I./clamav/libclamav -I./clamav/libclamunrar_iface -isystem ./clamav/ -isystem ./clamav/libclamav_rust -isystem /usr/include/libxml2 -isystem /usr/include/json-c -fPIE -Wall -Wextra -Wformat-security -std=gnu90 FRESHCLAM_CFLAGS += -DHAVE_CONFIG_H -I./clamav/libfreshclam -I./clamav/common -I./clamav/libclamav -I./clamav/libclamunrar_iface -isystem ./clamav/ -isystem ./clamav/libclamav_rust -isystem /usr/include/libxml2 -isystem /usr/include/json-c -fPIE -Wall -Wextra -Wformat-security -std=gnu90
FRESHCLAM_LIB += ./clamav/freshclam/freshclam.c.o ./clamav/freshclam/execute.c.o ./clamav/freshclam/notify.c.o -Wl,-rpath,$${PWD}/clamav ${PWD}/clamav/libfreshclam.so.2.0.2 ./clamav/libcommon.a -Wl,-rpath,$${PWD}/clamav $${PWD}/clamav/libclamav.so.11.0.0 -lmspack ./clamav/libclamav_rust/x86_64-unknown-linux-gnu/debug/libclamav_rust.a -lgcc_s -lutil -lrt -lpthread -lm -ldl -lc -lbz2 -lpcre2-8 -lxml2 -ljson-c -lc -ldl -lm -lz -lsystemd -lcurl -lssl -lcrypto -lresolv FRESHCLAM_LIB += ./clamav/freshclam/freshclam.c.o ./clamav/freshclam/execute.c.o ./clamav/freshclam/notify.c.o -Wl,-rpath,/lib /lib/clamav/libfreshclam.so.2.0.2 ./clamav/libcommon.a -Wl,-rpath,$${PWD}/clamav $${PWD}/clamav/libclamav.so.11.0.0 -lmspack ./clamav/libclamav_rust/x86_64-unknown-linux-gnu/debug/libclamav_rust.a -lgcc_s -lutil -lrt -lpthread -lm -ldl -lc -lbz2 -lpcre2-8 -lxml2 -ljson-c -lc -ldl -lm -lz -lsystemd -lcurl -lssl -lcrypto -lresolv
LIBCOMMON__CFLAGS += -DHAVE_CONFIG_H -I./clamav/common -I./clamav/libclamav -I./clamav/ -I./clamav/libclamunrar_iface -isystem ./clamav/ -isystem /usr/include/libxml2 -isystem /usr/include/json-c -fPIC -Wall -Wextra -Wformat-security LIBCOMMON__CFLAGS += -DHAVE_CONFIG_H -I./clamav/common -I./clamav/libclamav -I./clamav/ -I./clamav/libclamunrar_iface -isystem ./clamav/ -isystem /usr/include/libxml2 -isystem /usr/include/json-c -fPIC -Wall -Wextra -Wformat-security
LIBCOMMON_LIB += ./clamav/common/cert_util.c.o ./clamav/common/actions.c.o ./clamav/common/clamdcom.c.o ./clamav/common/getopt.c.o ./clamav/common/hostid.c.o ./clamav/common/idmef_logging.c.o ./clamav/common/misc.c.o ./clamav/common/optparser.c.o ./clamav/common/output.c.o ./clamav/common/tar.c.o ./clamav/common/linux/cert_util_linux.c.o LIBCOMMON_LIB += ./clamav/common/cert_util.c.o ./clamav/common/actions.c.o ./clamav/common/clamdcom.c.o ./clamav/common/getopt.c.o ./clamav/common/hostid.c.o ./clamav/common/idmef_logging.c.o ./clamav/common/misc.c.o ./clamav/common/optparser.c.o ./clamav/common/output.c.o ./clamav/common/tar.c.o ./clamav/common/linux/cert_util_linux.c.o
@ -55,7 +55,7 @@ all: conf.o rhost.o libiptc.o ccronexpr.o
$(CC) -DHAVE_CONFIG_H -Dfreshclam_EXPORTS -I./clamav/libfreshclam -I./clamav/common -I./clamav/libclamav -I./clamav/ -I./clamav/libclamunrar_iface -isystem clamav/libclamav_rust -isystem /usr/include/libxml2 -isystem /usr/include/json-c -fPIC -Wall -Wextra -Wformat-security -std=gnu90 -o clamav/libfreshclam/libfreshclam.c.o -c clamav/libfreshclam/libfreshclam.c $(CC) -DHAVE_CONFIG_H -Dfreshclam_EXPORTS -I./clamav/libfreshclam -I./clamav/common -I./clamav/libclamav -I./clamav/ -I./clamav/libclamunrar_iface -isystem clamav/libclamav_rust -isystem /usr/include/libxml2 -isystem /usr/include/json-c -fPIC -Wall -Wextra -Wformat-security -std=gnu90 -o clamav/libfreshclam/libfreshclam.c.o -c clamav/libfreshclam/libfreshclam.c
$(CC) -DHAVE_CONFIG_H -Dfreshclam_EXPORTS -I./clamav/libfreshclam -I./clamav/common -I./clamav/libclamav -I./clamav/ -I./clamav/libclamunrar_iface -isystem clamav/libclamav_rust -isystem /usr/include/libxml2 -isystem /usr/include/json-c -fPIC -Wall -Wextra -Wformat-security -std=gnu90 -o clamav/libfreshclam/libfreshclam_internal.c.o -c clamav/libfreshclam/libfreshclam_internal.c $(CC) -DHAVE_CONFIG_H -Dfreshclam_EXPORTS -I./clamav/libfreshclam -I./clamav/common -I./clamav/libclamav -I./clamav/ -I./clamav/libclamunrar_iface -isystem clamav/libclamav_rust -isystem /usr/include/libxml2 -isystem /usr/include/json-c -fPIC -Wall -Wextra -Wformat-security -std=gnu90 -o clamav/libfreshclam/libfreshclam_internal.c.o -c clamav/libfreshclam/libfreshclam_internal.c
$(CC) -DHAVE_CONFIG_H -Dfreshclam_EXPORTS -I./clamav/libfreshclam -I./clamav/common -I./clamav/libclamav -I./clamav/ -I./clamav/libclamunrar_iface -isystem clamav/libclamav_rust -isystem /usr/include/libxml2 -isystem /usr/include/json-c -fPIC -Wall -Wextra -Wformat-security -std=gnu90 -o clamav/libfreshclam/dns.c.o -c clamav/libfreshclam/dns.c $(CC) -DHAVE_CONFIG_H -Dfreshclam_EXPORTS -I./clamav/libfreshclam -I./clamav/common -I./clamav/libclamav -I./clamav/ -I./clamav/libclamunrar_iface -isystem clamav/libclamav_rust -isystem /usr/include/libxml2 -isystem /usr/include/json-c -fPIC -Wall -Wextra -Wformat-security -std=gnu90 -o clamav/libfreshclam/dns.c.o -c clamav/libfreshclam/dns.c
$(CC) -fPIC -shared -Wl,-soname,libfreshclam.so.2 -o clamav/libfreshclam.so.2.0.2 clamav/libfreshclam/libfreshclam.c.o clamav/libfreshclam/libfreshclam_internal.c.o clamav/libfreshclam/dns.c.o ./clamav/libcommon.a -lcurl -lssl -lcrypto -lresolv ${PWD}/clamav/libclamav.so.11.0.0 -lssl -lcrypto -lmspack ${PWD}/clamav/libclamav_rust/x86_64-unknown-linux-gnu/debug/libclamav_rust.a -lgcc_s -lutil -lrt -lpthread -lm -ldl -lc -lbz2 -lpcre2-8 -lxml2 -ljson-c -lc -ldl -lm -lz -lsystemd $(CC) -fPIC -shared -Wl,-soname,libfreshclam.so.2 -o clamav/libfreshclam.so.2.0.2 clamav/libfreshclam/libfreshclam.c.o clamav/libfreshclam/libfreshclam_internal.c.o clamav/libfreshclam/dns.c.o ./clamav/libcommon.a -lcurl -lssl -lcrypto -lresolv /lib/clamav/libclamav.so.11.0.0 -lssl -lcrypto -lmspack ${PWD}/clamav/libclamav_rust/x86_64-unknown-linux-gnu/debug/libclamav_rust.a -lgcc_s -lutil -lrt -lpthread -lm -ldl -lc -lbz2 -lpcre2-8 -lxml2 -ljson-c -lc -ldl -lm -lz -lsystemd
$(CC) $(CLAMAV_CFLAGS) -o ./clamav/clamscan/clamscan.c.o -c ./clamav/clamscan/clamscan.c $(CC) $(CLAMAV_CFLAGS) -o ./clamav/clamscan/clamscan.c.o -c ./clamav/clamscan/clamscan.c
$(CC) $(CLAMAV_CFLAGS) -o ./clamav/clamscan/manager.c.o -c ./clamav/clamscan/manager.c $(CC) $(CLAMAV_CFLAGS) -o ./clamav/clamscan/manager.c.o -c ./clamav/clamscan/manager.c
@ -76,8 +76,10 @@ libclamav_rust:
libclamav: libclamav:
cd clamav/ && bash -x build-libclamav.sh cd clamav/ && bash -x build-libclamav.sh
rm -rf ${PWD}/clamav/libclamav.so.11 && ln -s ${PWD}/clamav/libclamav.so.11.0.0 ${PWD}/clamav/libclamav.so.11 cp ${PWD}/clamav/libclamav.so.11.0.0 /lib/
rm -rf ${PWD}/clamav/libfreshclam.so.2 && ln -s ${PWD}/clamav/libfreshclam.so.2.0.2 ${PWD}/clamav/libfreshclam.so.2 cp ${PWD}/clamav/libfreshclam.so.2.0.2 /lib/
rm -rf /lib/libclamav.so.11 && ln -s /lib/libclamav.so.11.0.0 /lib/libclamav.so.11
rm -rf /lib/libfreshclam.so.2 && ln -s /lib/libfreshclam.so.2.0.2 /lib/libfreshclam.so.2
cd .. cd ..