diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-10-10 12:32:29 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-10-10 12:32:29 +0000 |
commit | 9c8997d54dc9df184bfcedeabf0b3c85cf5e6753 (patch) | |
tree | 46b83031a0da1b4458317413c00d13c252c72afa /package/network/utils/iwinfo/src/Makefile | |
parent | eecf5b17520f6b3b6ffb45ac7dca298d93b27501 (diff) |
packages: sort network related packages into package/network/
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33688 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/utils/iwinfo/src/Makefile')
-rw-r--r-- | package/network/utils/iwinfo/src/Makefile | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/package/network/utils/iwinfo/src/Makefile b/package/network/utils/iwinfo/src/Makefile new file mode 100644 index 000000000..572bef9f9 --- /dev/null +++ b/package/network/utils/iwinfo/src/Makefile @@ -0,0 +1,44 @@ +IWINFO_BACKENDS = $(BACKENDS) +IWINFO_CFLAGS = $(CFLAGS) -std=gnu99 -fstrict-aliasing -Iinclude + +IWINFO_LIB = libiwinfo.so +IWINFO_LIB_LDFLAGS = $(LDFLAGS) -shared +IWINFO_LIB_OBJ = iwinfo_utils.o iwinfo_wext.o iwinfo_wext_scan.o iwinfo_lib.o + +IWINFO_LUA = iwinfo.so +IWINFO_LUA_LDFLAGS = $(LDFLAGS) -shared -L. -liwinfo -llua +IWINFO_LUA_OBJ = iwinfo_lua.o + +IWINFO_CLI = iwinfo +IWINFO_CLI_LDFLAGS = $(LDFLAGS) -L. -liwinfo +IWINFO_CLI_OBJ = iwinfo_cli.o + + +ifneq ($(filter wl,$(IWINFO_BACKENDS)),) + IWINFO_CFLAGS += -DUSE_WL + IWINFO_LIB_OBJ += iwinfo_wl.o +endif + +ifneq ($(filter madwifi,$(IWINFO_BACKENDS)),) + IWINFO_CFLAGS += -DUSE_MADWIFI + IWINFO_LIB_OBJ += iwinfo_madwifi.o +endif + +ifneq ($(filter nl80211,$(IWINFO_BACKENDS)),) + IWINFO_CFLAGS += -DUSE_NL80211 + IWINFO_CLI_LDFLAGS += -lnl-tiny + IWINFO_LIB_LDFLAGS += -lnl-tiny + IWINFO_LIB_OBJ += iwinfo_nl80211.o +endif + + +%.o: %.c + $(CC) $(IWINFO_CFLAGS) $(FPIC) -c -o $@ $< + +compile: clean $(IWINFO_LIB_OBJ) $(IWINFO_LUA_OBJ) $(IWINFO_CLI_OBJ) + $(CC) $(IWINFO_LIB_LDFLAGS) -o $(IWINFO_LIB) $(IWINFO_LIB_OBJ) + $(CC) $(IWINFO_LUA_LDFLAGS) -o $(IWINFO_LUA) $(IWINFO_LUA_OBJ) + $(CC) $(IWINFO_CLI_LDFLAGS) -o $(IWINFO_CLI) $(IWINFO_CLI_OBJ) + +clean: + rm -f *.o $(IWINFO_LIB) $(IWINFO_LUA) $(IWINFO_CLI) |