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