1 IWINFO_BACKENDS
= $(BACKENDS
)
2 IWINFO_CFLAGS
= $(CFLAGS
) -std
=gnu99
-fstrict-aliasing
-Iinclude
4 IWINFO_LIB
= libiwinfo.so
5 IWINFO_LIB_LDFLAGS
= $(LDFLAGS
) -shared
6 IWINFO_LIB_OBJ
= iwinfo_utils.o iwinfo_wext.o iwinfo_wext_scan.o iwinfo_lib.o
9 IWINFO_LUA_LDFLAGS
= $(LDFLAGS
) -shared
-L.
-liwinfo
-llua
10 IWINFO_LUA_OBJ
= iwinfo_lua.o
13 IWINFO_CLI_LDFLAGS
= $(LDFLAGS
) -L.
-liwinfo
14 IWINFO_CLI_OBJ
= iwinfo_cli.o
17 ifneq ($(filter wl
,$(IWINFO_BACKENDS
)),)
18 IWINFO_CFLAGS
+= -DUSE_WL
19 IWINFO_LIB_OBJ
+= iwinfo_wl.o
22 ifneq ($(filter madwifi
,$(IWINFO_BACKENDS
)),)
23 IWINFO_CFLAGS
+= -DUSE_MADWIFI
24 IWINFO_LIB_OBJ
+= iwinfo_madwifi.o
27 ifneq ($(filter nl80211
,$(IWINFO_BACKENDS
)),)
28 IWINFO_CFLAGS
+= -DUSE_NL80211
29 IWINFO_CLI_LDFLAGS
+= -lnl-tiny
30 IWINFO_LIB_LDFLAGS
+= -lnl-tiny
31 IWINFO_LIB_OBJ
+= iwinfo_nl80211.o
36 $(CC
) $(IWINFO_CFLAGS
) $(FPIC
) -c
-o
$@
$<
38 compile
: clean $(IWINFO_LIB_OBJ
) $(IWINFO_LUA_OBJ
) $(IWINFO_CLI_OBJ
)
39 $(CC
) $(IWINFO_LIB_LDFLAGS
) -o
$(IWINFO_LIB
) $(IWINFO_LIB_OBJ
)
40 $(CC
) $(IWINFO_LUA_LDFLAGS
) -o
$(IWINFO_LUA
) $(IWINFO_LUA_OBJ
)
41 $(CC
) $(IWINFO_CLI_LDFLAGS
) -o
$(IWINFO_CLI
) $(IWINFO_CLI_OBJ
)
44 rm -f
*.o
$(IWINFO_LIB
) $(IWINFO_LUA
) $(IWINFO_CLI
)