aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest/Makefile
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-11-06 14:20:45 (GMT)
committerJouni Malinen <j@w1.fi>2010-11-07 21:29:00 (GMT)
commita149fcc77d3322bf23d1f53c2cd9fc84a1097c31 (patch)
tree50869affc977d98c872265f0493fa28bb10cb0bb /wlantest/Makefile
parent6fc58a89e1dc41a315b15c8e067dc50f30dd741e (diff)
downloadhostap-a149fcc77d3322bf23d1f53c2cd9fc84a1097c31.zip
hostap-a149fcc77d3322bf23d1f53c2cd9fc84a1097c31.tar.gz
hostap-a149fcc77d3322bf23d1f53c2cd9fc84a1097c31.tar.bz2
wlantest: Add preliminary version of IEEE 802.11 protocol testing tool
This tool can be used to capture IEEE 802.11 frames either from a monitor interface for realtime capturing or from pcap files for offline analysis. This version is only adding basic infrastructure for going through the frames and parsing their headers.
Diffstat (limited to 'wlantest/Makefile')
-rw-r--r--wlantest/Makefile81
1 files changed, 81 insertions, 0 deletions
diff --git a/wlantest/Makefile b/wlantest/Makefile
new file mode 100644
index 0000000..b09816a
--- /dev/null
+++ b/wlantest/Makefile
@@ -0,0 +1,81 @@
+ALL=wlantest
+
+all: $(ALL)
+
+ifndef CC
+CC=gcc
+endif
+
+ifndef RANLIB
+RANLIB=ranlib
+endif
+
+ifndef CFLAGS
+CFLAGS = -MMD -O2 -Wall -g
+endif
+
+
+CFLAGS += -I.
+CFLAGS += -I../src
+CFLAGS += -I../src/utils
+
+
+ifndef LDO
+LDO=$(CC)
+endif
+
+Q=@
+E=echo
+ifeq ($(V), 1)
+Q=
+E=true
+endif
+
+%.o: %.c
+ $(Q)$(CC) -c -o $@ $(CFLAGS) $<
+ @$(E) " CC " $<
+
+
+OBJS_lib += ../src/utils/libutils.a
+OBJS_lib += ../src/crypto/libcrypto.a
+
+OBJS += wlantest.o
+OBJS += readpcap.o
+OBJS += monitor.o
+OBJS += process.o
+OBJS += crc32.o
+
+LIBS += -lpcap
+
+
+../src/utils/libutils.a:
+ $(MAKE) -C ../src/utils
+
+../src/crypto/libcrypto.a:
+ $(MAKE) -C ../src/crypto
+
+
+ifneq ($(CONFIG_SOLIB), yes)
+LIBWLANTEST = libwlantest.a
+libwlantest.a: $(OBJS_lib)
+ $(AR) crT libwlantest.a $(OBJS_lib)
+ $(RANLIB) libwlantest.a
+
+else
+CFLAGS += -fPIC -DPIC
+LDFLAGS += -shared
+
+LIBWLANTEST = libwlantest.so
+libwlantest.so: $(OBJS_lib)
+ $(LDO) $(LDFLAGS) $(OBJS_lib) -o $(LIBWLANTEST)
+
+endif
+
+wlantest: $(OBJS) $(LIBWLANTEST)
+ $(LDO) $(LDFLAGS) -o wlantest $(OBJS) -L. -lwlantest $(LIBS)
+
+clean:
+ $(MAKE) -C ../src clean
+ rm -f core *~ *.o *.d libwlantest.a libwlantest.so $(ALL)
+
+-include $(OBJS:%.o=%.d)