-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
57 lines (46 loc) · 1.12 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
49
50
51
52
53
54
55
56
57
#
# This Makefile assumes that PF_RING is installed as a binary package: see http://packages.ntop.org
#
#
# DNA Support
DNA_DEFINE = #-DENABLE_DNA_SUPPORT
#
# PF_RING aware libpcap
#
O_FLAG = -O2 -DHAVE_PF_RING
#
# MONGODB
#
MONGODIR = /usr/local/include/libmongoc-1.0
BSONDIR = /usr/local/include/libbson-1.0
MONGOLIBDIR = /usr/local/lib
# Search directories
#
INCLUDE = -I${MONGODIR} -I${BSONDIR}
#
# C compiler and flags
#
#
# CROSS_COMPILE=arm-mv5sft-linux-gnueabi-
#-std=gnu9
CC = ${CROSS_COMPILE}gcc #--platform=native
CFLAGS = ${O_FLAG} -Wall -std=gnu99 ${INCLUDE} ${DNA_DEFINE} -D HAVE_ZERO -D ENABLE_BPF -D HAVE_LIBNUMA -D HAVE_PTHREAD_SETAFFINITY_NP -O2 -L${MONGOLIBDIR}# -g
# LDFLAGS =
#
# User and System libraries
#
LIBS = -lpcap -lpthread -lpfring -lrt -lnuma -lrt -lmongoc-1.0 -lbson-1.0
# How to make an object file
%.o: %.c
@echo "=*= making object $@ =*="
${CC} ${CFLAGS} -c $< -o $@
#
# Main targets
#
PFPROGS = amon
TARGETS = ${PFPROGS}
all: ${TARGETS}
amon: bm_structs.o amon.o
${CC} ${CFLAGS} amon.o bm_structs.o ${LIBS} -o $@
clean:
@rm -f ${TARGETS} *.o *~