forked from hoterran/tcpcollect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (31 loc) · 1.09 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
CC=gcc -O0
CFLAGS= -g -Wall
INSTALL=/usr/bin/install
INSTALLDIR=/usr/local
BINDIR=$(INSTALLDIR)/bin
COMPILE.c = $(CC) $(CFLAGS) $(INCLUDE) $(CPPFLAGS) $(TARGET_ARCH) -c
LINK.o = $(CC) $(INCLUDE) $(LDFLAGS) $(TARGET_ARCH)
LINK.c = $(CC) $(CFLAGS) $(INCLUDE) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)
VPATH=./
TARGET=libpcap mysqlpcap
all:$(TARGET)
libpcap-pfring: dummy
@cd libpcap-pfring && ./configure && make
libpcap: dummy
@cd libpcap && ./configure && make
mysqlpcap:LOADLIBES += libpcap/libpcap.a -lpthread
mysqlpcap:CFLAGS += -Ilibpcap -DDEBUG
mysqlpcap: mysqlpcap.c hash.o log.o packet.o protocol.o address.o utils.o adlist.o user.o file_cache.o stat.o
#mysqlpcap:LOADLIBES += lib/libpcap.a lib/libpfring.a -lpthread
#mysqlpcap:CFLAGS += -Ilibpcap-pfring
#mysqlpcap: mysqlpcap.c hash.o log.o packet.o protocol.o address.o adlist.o utils.o
clean:
- rm -f *.o mysqlpcap && cd libpcap && make clean
install:$(TARGET)
mkdir -p $(BINDIR)
$(INSTALL) $(TARGET) $(BINDIR)
dummy:
test:user_test
./user_test
user_test: user.c
gcc -g -o user_test -D_USER_TEST_ -DDEBUG user.c log.c utils.c adlist.c