blob: 039d34072f3fbeb7a3b9ecb8ad9aae17c5cbc634 [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
Jouni Malinenad8a24e2018-09-04 13:20:11 +030059ifdef SERVER
Jouni Malinencd4e3c32015-10-29 12:39:56 +020060CFLAGS += -DCONFIG_SERVER
61OBJS += server.o
Jouni Malinen3b17d532018-09-04 19:10:58 +030062LIBS += -lsqlite3
Jouni Malinencd4e3c32015-10-29 12:39:56 +020063endif
64
Amarnath Hullur Subramanyam9c381f52017-03-17 00:04:41 -070065ifdef MIRACAST
66OBJS += miracast.o
67CFLAGS += -DMIRACAST -DMIRACAST_DHCP_M
68LIBS += -ldl
69endif
70
Peng Xu291d97d2018-01-31 16:34:03 -080071ifdef NL80211_SUPPORT
72CFLAGS += -DNL80211_SUPPORT -I /usr/include/libnl3
73LIBS += -lnl-3 -lnl-genl-3
74endif
75
Jouni Malinencd4e3c32015-10-29 12:39:56 +020076sigma_dut: $(OBJS)
77 $(LDO) $(LDFLAGS) -o sigma_dut $(OBJS) $(LIBS)
78
79clean:
80 rm -f core *~ *.o *.d sigma_dut
81
82$(DESTDIR)$(BINDIR)/%: %
83 install -D $(<) $(@)
84
85install: $(addprefix $(DESTDIR)$(BINDIR)/,$(ALL))
86
87-include $(OBJS:%.o=%.d)