1 2ALL=sigma_dut 3 4all: $(ALL) 5 6ifndef CC 7CC=gcc 8endif 9 10ifndef LDO 11LDO=$(CC) 12endif 13 14ifndef CFLAGS 15CFLAGS = -MMD -O2 -Wall -g 16endif 17 18GITVER := $(shell git describe --dirty=+) 19ifneq ($(GITVER),) 20CFLAGS += -DSIGMA_DUT_VER=\"$(GITVER)\" 21endif 22 23export BINDIR ?= /usr/local/bin/ 24 25OBJS=sigma_dut.o 26OBJS += utils.o 27OBJS += wpa_ctrl.o 28OBJS += wpa_helpers.o 29 30OBJS += cmds_reg.o 31OBJS += basic.o 32OBJS += sta.o 33OBJS += traffic.o 34OBJS += p2p.o 35OBJS += dev.o 36OBJS += ap.o 37OBJS += powerswitch.o 38OBJS += atheros.o 39OBJS += ftm.o 40OBJS += dpp.o 41 42ifndef NO_TRAFFIC_AGENT 43CFLAGS += -DCONFIG_TRAFFIC_AGENT -DCONFIG_WFA_WMM_AC 44OBJS += traffic_agent.o 45OBJS += uapsd_stream.o 46LIBS += -lpthread 47endif 48 49ifndef NO_WLANTEST 50CFLAGS += -DCONFIG_WLANTEST 51OBJS += wlantest.o 52endif 53 54ifndef NO_SNIFFER 55CFLAGS += -DCONFIG_SNIFFER 56OBJS += sniffer.o 57endif 58 59ifndef NO_SERVER 60CFLAGS += -DCONFIG_SERVER 61OBJS += server.o 62endif 63 64ifdef MIRACAST 65OBJS += miracast.o 66CFLAGS += -DMIRACAST -DMIRACAST_DHCP_M 67LIBS += -ldl 68endif 69 70ifdef NL80211_SUPPORT 71CFLAGS += -DNL80211_SUPPORT -I /usr/include/libnl3 72LIBS += -lnl-3 -lnl-genl-3 73endif 74 75sigma_dut: $(OBJS) 76 $(LDO) $(LDFLAGS) -o sigma_dut $(OBJS) $(LIBS) 77 78clean: 79 rm -f core *~ *.o *.d sigma_dut 80 81$(DESTDIR)$(BINDIR)/%: % 82 install -D $(<) $(@) 83 84install: $(addprefix $(DESTDIR)$(BINDIR)/,$(ALL)) 85 86-include $(OBJS:%.o=%.d) 87