-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
48 lines (37 loc) · 1.14 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Makefile, modified from PF_RING examples Makefile.in
#
# PF_RING
#
PFRINGDIR = ./PF_RING/userland/lib
LIBPFRING = ${PFRINGDIR}/libpfring.a
#
# PF_RING aware libpcap
#
PCAPDIR = ./PF_RING/userland/libpcap
LIBPCAP = ${PCAPDIR}/libpcap.a
PFUTILSDIR = ./PF_RING/userland/examples
#
# Search directories
#
PFRING_KERNEL= ./PF_RING/kernel/
INCLUDE = -I${PFRING_KERNEL} -I${PFRING_KERNEL}/plugins -I${PFRINGDIR} -I${PFUTILSDIR} -I${PCAPDIR} -Ithird-party -I`${PFRINGDIR}/pfring_config --include`
#
# C compiler and flags
#
CC = gcc
CFLAGS = -O2 -DHAVE_PF_RING -Wall ${INCLUDE} -DENABLE_BPF -D HAVE_PF_RING_ZC # -g
#CFLAGS += -g
#
# User and System libraries
#
DEBUG_OR_RELEASE = release
LIBS = ${LIBPFRING} ${LIBPCAP} `${PFRINGDIR}/pfring_config --libs` -lpthread -lrt -Lrust-src/target/${DEBUG_OR_RELEASE} -ltls_fingerprint -ldl -lm
all: tls-fingerprint
tls-fingerprint.o: main.c #${PFUTILSDIR}/pfutils.c
${CC} ${CFLAGS} -c $< -o $@
rust-code:
cd ./rust-src/; cargo build --${DEBUG_OR_RELEASE}
tls-fingerprint: tls-fingerprint.o ${LIBPFRING} rust-code
${CC} ${CFLAGS} $< -o $@ ${LIBS}
clean:
@rm -f tls-fingerprint *.o *~