IWINFO_LIB = libiwinfo.so
IWINFO_LIB_LDFLAGS = $(LDFLAGS) -shared -Wl,-soname -Wl,$(IWINFO_LIB).$(IWINFO_SOVERSION)
-IWINFO_LIB_OBJ = iwinfo_utils.o iwinfo_wext.o iwinfo_wext_scan.o iwinfo_lib.o
+IWINFO_LIB_OBJ = iwinfo_utils.o iwinfo_lib.o
IWINFO_LUA = iwinfo.so
IWINFO_LUA_LDFLAGS = $(LDFLAGS) -shared -L. -liwinfo -llua
IWINFO_CLI_OBJ = iwinfo_cli.o
+ifneq ($(filter wl wext madwifi,$(IWINFO_BACKENDS)),)
+ IWINFO_CFLAGS += -DUSE_WEXT
+ IWINFO_LIB_OBJ += iwinfo_wext.o iwinfo_wext_scan.o
+endif
+
ifneq ($(filter wl,$(IWINFO_BACKENDS)),)
IWINFO_CFLAGS += -DUSE_WL
IWINFO_LIB_OBJ += iwinfo_wl.o
#endif
/* Wext */
+#ifdef USE_WEXT
LUA_WRAP_INT_OP(wext,channel)
LUA_WRAP_INT_OP(wext,frequency)
LUA_WRAP_INT_OP(wext,frequency_offset)
LUA_WRAP_STRUCT_OP(wext,encryption)
LUA_WRAP_STRUCT_OP(wext,mbssid_support)
LUA_WRAP_STRUCT_OP(wext,hardware_id)
+#endif
#ifdef USE_WL
/* Broadcom table */
#endif
/* Wext table */
+#ifdef USE_WEXT
static const luaL_reg R_wext[] = {
LUA_REG(wext,channel),
LUA_REG(wext,frequency),
LUA_REG(wext,phyname),
{ NULL, NULL }
};
+#endif
/* Common */
static const luaL_reg R_common[] = {
lua_setfield(L, -2, "nl80211");
#endif
+#ifdef USE_WEXT
luaL_newmetatable(L, IWINFO_WEXT_META);
luaL_register(L, NULL, R_common);
luaL_register(L, NULL, R_wext);
lua_pushvalue(L, -1);
lua_setfield(L, -2, "__index");
lua_setfield(L, -2, "wext");
+#endif
return 1;
}