blob: ac4f4eb5b0685adcd63eb38b8961f40b8c6a1d9e [file] [log] [blame]
Jouni Malinencd4e3c32015-10-29 12:39:56 +02001
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
priyadharshini gowthamand66913a2016-07-29 15:11:17 -070039OBJS += ftm.o
Jouni Malinend86e5822017-08-29 03:55:32 +030040OBJS += dpp.o
Jouni Malinencd4e3c32015-10-29 12:39:56 +020041
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
Amarnath Hullur Subramanyam9c381f52017-03-17 00:04:41 -070064ifdef MIRACAST
65OBJS += miracast.o
66CFLAGS += -DMIRACAST -DMIRACAST_DHCP_M
67LIBS += -ldl
68endif
69
Peng Xu291d97d2018-01-31 16:34:03 -080070ifdef NL80211_SUPPORT
71CFLAGS += -DNL80211_SUPPORT -I /usr/include/libnl3
72LIBS += -lnl-3 -lnl-genl-3
73endif
74
Jouni Malinencd4e3c32015-10-29 12:39:56 +020075sigma_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)