• 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) -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_wext.o iwinfo_wext_scan.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,$(IWINFO_BACKENDS)),)
 21         IWINFO_CFLAGS  += -DUSE_WL
 22         IWINFO_LIB_OBJ += iwinfo_wl.o
 23 endif
 24 
 25 ifneq ($(filter madwifi,$(IWINFO_BACKENDS)),)
 26         IWINFO_CFLAGS  += -DUSE_MADWIFI
 27         IWINFO_LIB_OBJ += iwinfo_madwifi.o
 28 endif
 29 
 30 ifneq ($(filter nl80211,$(IWINFO_BACKENDS)),)
 31         IWINFO_CFLAGS      += -DUSE_NL80211
 32         IWINFO_CLI_LDFLAGS += -lnl-tiny
 33         IWINFO_LIB_LDFLAGS += -lnl-tiny
 34         IWINFO_LIB_OBJ     += iwinfo_nl80211.o
 35 endif
 36 
 37 
 38 compile: clean $(IWINFO_LIB) $(IWINFO_LUA) $(IWINFO_CLI)
 39 
 40 %.o: %.c
 41         $(CC) $(IWINFO_CFLAGS) $(FPIC) -c -o $@ $<
 42 
 43 $(IWINFO_LIB): $(IWINFO_LIB_OBJ)
 44         $(CC) $(IWINFO_LDFLAGS) $(IWINFO_LIB_LDFLAGS) -o $(IWINFO_LIB).$(IWINFO_SOVERSION) $(IWINFO_LIB_OBJ) && \
 45         ln -sf $(IWINFO_LIB).$(IWINFO_SOVERSION) $(IWINFO_LIB)
 46 
 47 $(IWINFO_LUA): $(IWINFO_LUA_OBJ)
 48         $(CC) $(IWINFO_LDFLAGS) $(IWINFO_LUA_LDFLAGS) -o $(IWINFO_LUA) $(IWINFO_LUA_OBJ)
 49 
 50 $(IWINFO_CLI): $(IWINFO_CLI_OBJ)
 51         $(CC) $(IWINFO_LDFLAGS) $(IWINFO_CLI_LDFLAGS) -o $(IWINFO_CLI) $(IWINFO_CLI_OBJ)
 52 
 53 clean:
 54         rm -f *.o $(IWINFO_LIB) $(IWINFO_LUA) $(IWINFO_CLI)

This page was automatically generated by LXR 0.3.1.  •  OpenWrt