2010-11-13 11:38:19 -05:00
|
|
|
ALL=wlantest wlantest_cli
|
2010-11-06 10:20:45 -04: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
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2010-11-09 13:29:12 -05:00
|
|
|
CFLAGS += -DCONFIG_PEERKEY
|
|
|
|
CFLAGS += -DCONFIG_IEEE80211W
|
|
|
|
CFLAGS += -DCONFIG_IEEE80211R
|
|
|
|
|
2010-11-06 11:11:12 -04:00
|
|
|
OBJS += ../src/common/ieee802_11_common.o
|
2010-11-06 16:57:49 -04:00
|
|
|
OBJS += ../src/common/wpa_common.o
|
2010-11-07 10:59:50 -05:00
|
|
|
OBJS += ../src/radius/radius.o
|
2010-11-09 13:29:12 -05:00
|
|
|
OBJS += ../src/rsn_supp/wpa_ie.o
|
2010-11-06 11:11:12 -04:00
|
|
|
|
2010-11-06 10:20:45 -04:00
|
|
|
OBJS += wlantest.o
|
|
|
|
OBJS += readpcap.o
|
2010-11-11 18:00:31 -05:00
|
|
|
OBJS += writepcap.o
|
2010-11-06 10:20:45 -04:00
|
|
|
OBJS += monitor.o
|
|
|
|
OBJS += process.o
|
2010-11-07 10:59:50 -05:00
|
|
|
OBJS += wired.o
|
2010-11-06 12:01:24 -04:00
|
|
|
OBJS += rx_mgmt.o
|
|
|
|
OBJS += rx_data.o
|
2010-11-06 11:11:12 -04:00
|
|
|
OBJS += bss.o
|
2010-11-06 11:31:02 -04:00
|
|
|
OBJS += sta.o
|
2010-11-06 10:20:45 -04:00
|
|
|
OBJS += crc32.o
|
2010-11-10 18:29:30 -05:00
|
|
|
OBJS += ccmp.o
|
2010-11-13 04:36:37 -05:00
|
|
|
OBJS += tkip.o
|
2010-11-13 11:38:19 -05:00
|
|
|
OBJS += ctrl.o
|
2010-11-18 17:35:13 -05:00
|
|
|
OBJS += inject.o
|
2010-11-06 10:20:45 -04:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2010-11-13 11:38:19 -05:00
|
|
|
|
|
|
|
OBJS_cli = wlantest_cli.o
|
|
|
|
|
|
|
|
|
2010-11-06 10:20:45 -04:00
|
|
|
wlantest: $(OBJS) $(LIBWLANTEST)
|
|
|
|
$(LDO) $(LDFLAGS) -o wlantest $(OBJS) -L. -lwlantest $(LIBS)
|
|
|
|
|
2010-11-18 09:27:25 -05:00
|
|
|
wlantest_cli: $(OBJS_cli) $(LIBWLANTEST)
|
2010-11-13 11:38:19 -05:00
|
|
|
$(LDO) $(LDFLAGS) -o wlantest_cli $(OBJS_cli) -L. -lwlantest
|
|
|
|
|
2010-11-06 10:20:45 -04:00
|
|
|
clean:
|
|
|
|
$(MAKE) -C ../src clean
|
|
|
|
rm -f core *~ *.o *.d libwlantest.a libwlantest.so $(ALL)
|
|
|
|
|
|
|
|
-include $(OBJS:%.o=%.d)
|