2012-09-08 13:03:43 +02:00
|
|
|
ALL=wlantest wlantest_cli test_vectors
|
2010-11-06 15:20:45 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2013-11-20 11:01:09 +01:00
|
|
|
# glibc < 2.17 needs -lrt for clock_gettime()
|
|
|
|
LIBS += -lrt
|
2010-11-06 15:20:45 +01:00
|
|
|
|
|
|
|
ifndef LDO
|
|
|
|
LDO=$(CC)
|
|
|
|
endif
|
|
|
|
|
|
|
|
Q=@
|
|
|
|
E=echo
|
|
|
|
ifeq ($(V), 1)
|
|
|
|
Q=
|
|
|
|
E=true
|
|
|
|
endif
|
2014-12-26 11:49:03 +01:00
|
|
|
ifeq ($(QUIET), 1)
|
|
|
|
Q=@
|
|
|
|
E=true
|
|
|
|
endif
|
2010-11-06 15:20:45 +01:00
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(Q)$(CC) -c -o $@ $(CFLAGS) $<
|
|
|
|
@$(E) " CC " $<
|
|
|
|
|
|
|
|
|
|
|
|
OBJS_lib += ../src/utils/libutils.a
|
|
|
|
OBJS_lib += ../src/crypto/libcrypto.a
|
|
|
|
|
2010-11-09 19:29:12 +01:00
|
|
|
CFLAGS += -DCONFIG_PEERKEY
|
|
|
|
CFLAGS += -DCONFIG_IEEE80211W
|
2018-08-06 21:46:25 +02:00
|
|
|
CFLAGS += -DCONFIG_OCV
|
2010-11-09 19:29:12 +01:00
|
|
|
CFLAGS += -DCONFIG_IEEE80211R
|
2014-05-15 11:40:02 +02:00
|
|
|
CFLAGS += -DCONFIG_HS20
|
2013-11-17 20:16:29 +01:00
|
|
|
CFLAGS += -DCONFIG_DEBUG_FILE
|
2017-09-05 17:59:41 +02:00
|
|
|
CFLAGS += -DCONFIG_FILS
|
2010-11-09 19:29:12 +01:00
|
|
|
|
2010-11-06 16:11:12 +01:00
|
|
|
OBJS += ../src/common/ieee802_11_common.o
|
2010-11-06 21:57:49 +01:00
|
|
|
OBJS += ../src/common/wpa_common.o
|
2010-11-07 16:59:50 +01:00
|
|
|
OBJS += ../src/radius/radius.o
|
2010-11-09 19:29:12 +01:00
|
|
|
OBJS += ../src/rsn_supp/wpa_ie.o
|
2010-11-06 16:11:12 +01:00
|
|
|
|
2010-11-06 15:20:45 +01:00
|
|
|
OBJS += wlantest.o
|
|
|
|
OBJS += readpcap.o
|
2010-11-12 00:00:31 +01:00
|
|
|
OBJS += writepcap.o
|
2010-11-06 15:20:45 +01:00
|
|
|
OBJS += monitor.o
|
|
|
|
OBJS += process.o
|
2010-11-07 16:59:50 +01:00
|
|
|
OBJS += wired.o
|
2010-11-06 17:01:24 +01:00
|
|
|
OBJS += rx_mgmt.o
|
|
|
|
OBJS += rx_data.o
|
2010-11-20 20:40:04 +01:00
|
|
|
OBJS += rx_eapol.o
|
2010-11-20 21:34:42 +01:00
|
|
|
OBJS += rx_ip.o
|
2010-12-13 10:20:55 +01:00
|
|
|
OBJS += rx_tdls.o
|
2010-11-06 16:11:12 +01:00
|
|
|
OBJS += bss.o
|
2010-11-06 16:31:02 +01:00
|
|
|
OBJS += sta.o
|
2010-11-11 00:29:30 +01:00
|
|
|
OBJS += ccmp.o
|
2010-11-13 10:36:37 +01:00
|
|
|
OBJS += tkip.o
|
2010-11-13 17:38:19 +01:00
|
|
|
OBJS += ctrl.o
|
2010-11-18 23:35:13 +01:00
|
|
|
OBJS += inject.o
|
2011-01-14 16:43:17 +01:00
|
|
|
OBJS += wep.o
|
2012-09-08 15:32:35 +02:00
|
|
|
OBJS += bip.o
|
2014-08-29 15:05:05 +02:00
|
|
|
OBJS += gcmp.o
|
2010-11-06 15:20:45 +01:00
|
|
|
|
|
|
|
LIBS += -lpcap
|
|
|
|
|
2012-09-08 13:03:43 +02:00
|
|
|
TOBJS += test_vectors.o
|
|
|
|
TOBJS += ccmp.o
|
|
|
|
TOBJS += tkip.o
|
|
|
|
TOBJS += wep.o
|
2012-09-08 15:43:11 +02:00
|
|
|
TOBJS += bip.o
|
2012-09-08 19:00:54 +02:00
|
|
|
TOBJS += gcmp.o
|
2012-09-08 13:03:43 +02:00
|
|
|
|
2010-11-06 15:20:45 +01:00
|
|
|
|
|
|
|
../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
|
|
|
|
|
2010-11-13 17:38:19 +01:00
|
|
|
|
|
|
|
OBJS_cli = wlantest_cli.o
|
|
|
|
|
|
|
|
|
2010-11-06 15:20:45 +01:00
|
|
|
wlantest: $(OBJS) $(LIBWLANTEST)
|
|
|
|
$(LDO) $(LDFLAGS) -o wlantest $(OBJS) -L. -lwlantest $(LIBS)
|
|
|
|
|
2010-11-18 15:27:25 +01:00
|
|
|
wlantest_cli: $(OBJS_cli) $(LIBWLANTEST)
|
2013-11-20 11:01:09 +01:00
|
|
|
$(LDO) $(LDFLAGS) -o wlantest_cli $(OBJS_cli) -L. -lwlantest $(LIBS)
|
2010-11-13 17:38:19 +01:00
|
|
|
|
2012-09-08 13:03:43 +02:00
|
|
|
test_vectors: $(TOBJS) $(LIBWLANTEST)
|
|
|
|
$(LDO) $(LDFLAGS) -o test_vectors $(TOBJS) -L. -lwlantest $(LIBS)
|
|
|
|
|
2010-11-06 15:20:45 +01:00
|
|
|
clean:
|
|
|
|
$(MAKE) -C ../src clean
|
|
|
|
rm -f core *~ *.o *.d libwlantest.a libwlantest.so $(ALL)
|
|
|
|
|
|
|
|
-include $(OBJS:%.o=%.d)
|