]>
Commit | Line | Data |
---|---|---|
7153dbf3 | 1 | -include .config |
cad53b3f | 2 | |
7153dbf3 MK |
3 | CC ?= "gcc" |
4 | CFLAGS += -Wall -I/lib/modules/`uname -r`/build/include -g | |
5 | LDFLAGS += -lnl | |
cad53b3f | 6 | |
79f99b9a | 7 | OBJS = iw.o interface.o info.o |
7153dbf3 MK |
8 | ALL = iw |
9 | ||
10 | all: verify_config $(ALL) | |
11 | ||
12 | iw: $(OBJS) | |
13 | $(CC) $(CFLAGS) $(OBJS) -o iw $(LDFLAGS) | |
cad53b3f JB |
14 | |
15 | clean: | |
6fbe8fb8 | 16 | rm -f iw *.o *~ |
7153dbf3 MK |
17 | |
18 | verify_config: | |
19 | @if [ ! -r .config ]; then \ | |
20 | echo 'Building iw requires a configuration file'; \ | |
11b24c28 | 21 | echo '(.config). cp defconfig .config and edit.'; \ |
7153dbf3 MK |
22 | exit 1; \ |
23 | fi |