-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathMakefile
52 lines (39 loc) · 1.26 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
PYTHON?=python
all: wifi_signature anonymize_pcap fix_pcap_snaplen build
test: wifi_signature anonymize_pcap
set -e; \
for d in $(wildcard tests/*_test.py); do \
PYTHONPATH=./taxonomy $(PYTHON) $$d; \
done
for d in $(wildcard tests/*_test.sh); do \
$$d; \
done
PREFIX=/usr
build:
cd ./taxonomy && $(HOSTDIR)/usr/bin/python setup.py build
install:
cd ./taxonomy && $(HOSTDIR)/usr/bin/python setup.py install --prefix=$(DESTDIR)$(PREFIX)
install-libs:
@echo "No libs to install."
CC:=$(CROSS_COMPILE)gcc
CPP:=$(CROSS_COMPILE)g++
LD:=$(CROSS_COMPILE)ld
AR:=$(CROSS_COMPILE)ar
RANLIB:=$(CROSS_COMPILE)ranlib
STRIP:=$(CROSS_COMPILE)strip
BINDIR=$(DESTDIR)/bin
CFLAGS += -g -Os -Wall -Werror $(EXTRACFLAGS)
LDFLAGS += $(EXTRALDFLAGS)
INCS =
%.o : %.c
$(CC) -c $(CFLAGS) $< -o $@
wifi_signature: wifi_signature.o $(INCS)
$(CC) $(CFLAGS) -I$(HOSTDIR)/usr/include wifi_signature.c -o $@ $(LDFLAGS) -lpcap
anonymize_pcap: anonymize_pcap.o $(INCS)
$(CC) $(CFLAGS) -I$(HOSTDIR)/usr/include anonymize_pcap.c -o $@ $(LDFLAGS) -lpcap
fix_pcap_snaplen: fix_pcap_snaplen.o $(INCS)
$(CC) $(CFLAGS) -I$(HOSTDIR)/usr/include fix_pcap_snaplen.c -o $@ $(LDFLAGS)
clean:
rm -f wifi_signature anonymize_pcap fix_pcap_snaplen
rm -f *.o taxonomy/*.pyc taxonomy/*.pyo
rm -rf taxonomy/build