• source navigation  • diff markup  • identifier search  • freetext search  • 

Sources/iwinfo/Makefile

  1 IWINFO_SOVERSION   = $(if $(SOVERSION),$(SOVERSION),0)
  2 
  3 IWINFO_BACKENDS    = $(BACKENDS)
  4 IWINFO_CFLAGS      = $(CFLAGS) -Wall -std=gnu99 -fstrict-aliasing -Iinclude
  5 IWINFO_LDFLAGS     = -luci -lubox -lubus
  6 
  7 IWINFO_LIB         = libiwinfo.so
  8 IWINFO_LIB_LDFLAGS = $(LDFLAGS) -shared -Wl,-soname -Wl,$(IWINFO_LIB).$(IWINFO_SOVERSION)
  9 IWINFO_LIB_OBJ     = iwinfo_utils.o iwinfo_lib.o
 10 
 11 IWINFO_LUA         = iwinfo.so
 12 IWINFO_LUA_LDFLAGS = $(LDFLAGS) -shared -L. -liwinfo -llua
 13 IWINFO_LUA_OBJ     = iwinfo_lua.o
 14 
 15 IWINFO_CLI         = iwinfo
 16 IWINFO_CLI_LDFLAGS = $(LDFLAGS) -L. -liwinfo
 17 IWINFO_CLI_OBJ     = iwinfo_cli.o
 18 
 19 
 20 ifneq ($(filter wl wext madwifi,$(IWINFO_BACKENDS)),)
 21         IWINFO_CFLAGS  += -DUSE_WEXT
 22         IWINFO_LIB_OBJ += iwinfo_wext.o iwinfo_wext_scan.o
 23 endif
 24 
 25 ifneq ($(filter wl,$(IWINFO_BACKENDS)),)
 26         IWINFO_CFLAGS  += -DUSE_WL
 27         IWINFO_LIB_OBJ += iwinfo_wl.o
 28 endif
 29 
 30 ifneq ($(filter madwifi,$(IWINFO_BACKENDS)),)
 31         IWINFO_CFLAGS  += -DUSE_MADWIFI
 32         IWINFO_LIB_OBJ += iwinfo_madwifi.o
 33 endif
 34 
 35 ifneq ($(filter nl80211,$(IWINFO_BACKENDS)),)
 36         IWINFO_CFLAGS      += -DUSE_NL80211
 37         IWINFO_CLI_LDFLAGS += -lnl-tiny
 38         IWINFO_LIB_LDFLAGS += -lnl-tiny
 39         IWINFO_LIB_OBJ     += iwinfo_nl80211.o
 40 endif
 41 
 42 
 43 compile: clean $(IWINFO_LIB) $(IWINFO_LUA) $(IWINFO_CLI)
 44 
 45 %.o: %.c
 46         $(CC) $(IWINFO_CFLAGS) $(FPIC) -c -o $@ $<
 47 
 48 $(IWINFO_LIB): $(IWINFO_LIB_OBJ)
 49         $(CC) $(IWINFO_LDFLAGS) $(IWINFO_LIB_LDFLAGS) -o $(IWINFO_LIB).$(IWINFO_SOVERSION) $(IWINFO_LIB_OBJ) && \
 50         ln -sf $(IWINFO_LIB).$(IWINFO_SOVERSION) $(IWINFO_LIB)
 51 
 52 $(IWINFO_LUA): $(IWINFO_LUA_OBJ)
 53         $(CC) $(IWINFO_LDFLAGS) $(IWINFO_LUA_LDFLAGS) -o $(IWINFO_LUA) $(IWINFO_LUA_OBJ)
 54 
 55 $(IWINFO_CLI): $(IWINFO_CLI_OBJ)
 56         $(CC) $(IWINFO_LDFLAGS) $(IWINFO_CLI_LDFLAGS) -o $(IWINFO_CLI) $(IWINFO_CLI_OBJ)
 57 
 58 clean:
 59         rm -f *.o $(IWINFO_LIB) $(IWINFO_LUA) $(IWINFO_CLI)

This page was automatically generated by LXR 0.3.1.  •  OpenWrt