优化Makefil
This commit is contained in:
parent
45fe15f472
commit
e424cc1c04
12
Makefile
12
Makefile
@ -2,11 +2,19 @@ CROSS_COMPILE ?=
|
||||
CC := $(CROSS_COMPILE)gcc
|
||||
AR := $(CROSS_COMPILE)ar
|
||||
RANLIB := $(CROSS_COMPILE)ranlib
|
||||
CMAKE := cmake
|
||||
|
||||
OBG = rhost
|
||||
CFLAGS += -Os -g -Wall -DCRON_USE_LOCAL_TIME -DCRON_TEST_MALLOC
|
||||
|
||||
|
||||
CMAKE = $(shell if test -f /etc/centos-release; then echo "1"; else echo "0"; fi)
|
||||
ifeq ("$(CMAKE)", "1")
|
||||
CMAKE := cmake3
|
||||
else
|
||||
CMAKE := cmake
|
||||
endif
|
||||
|
||||
|
||||
IPTC_CFLAGS += -DHAVE_CONFIG_H -I./libiptc -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT
|
||||
IPTC_LIB += -lip4tc
|
||||
|
||||
@ -74,7 +82,7 @@ libclamav:
|
||||
|
||||
|
||||
test:
|
||||
ls `echo $${PWD}`
|
||||
echo $(CMAKE)
|
||||
|
||||
static: conf.o rhost.o libiptc.o
|
||||
$(CC) $(IPTC_CFLAGS) -c libiptc/libip4tc.c -o libiptc/libip4tc.o
|
||||
|
@ -11,6 +11,7 @@
|
||||
```
|
||||
```
|
||||
Debian
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
apt -y install libclamav-dev libip4tc-dev libcurl4-openssl-dev #(或者libcurl4-gnutls-dev)
|
||||
apt -y install libsystemd-dev libjson-c-dev libpcre2-dev clamav-freshclam
|
||||
apt -y install libltdl-dev libmspack-dev
|
||||
@ -27,6 +28,7 @@ Debian
|
||||
|
||||
```
|
||||
Centos 7
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
yum install clamav clamav-update clamav-lib clamav-devel json-c-devel pcre2-devel
|
||||
yum install iptables-devel libcurl-devel
|
||||
yum install systemd-devel libtool-ltdl-devel libmspack-devel
|
||||
|
Loading…
Reference in New Issue
Block a user