2010-11-06 15:20:45 +01:00
|
|
|
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
|
|
|
|
|
2010-11-06 16:11:12 +01:00
|
|
|
OBJS += ../src/common/ieee802_11_common.o
|
|
|
|
|
2010-11-06 15:20:45 +01:00
|
|
|
OBJS += wlantest.o
|
|
|
|
OBJS += readpcap.o
|
|
|
|
OBJS += monitor.o
|
|
|
|
OBJS += process.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-06 15:20:45 +01:00
|
|
|
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)
|