blob: f9ce36abf422c2eae7606900ac8e77aaf80b0fda (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
ifneq (,$(wildcard ../../build/config.mk))
include ../../build/config.mk
include ../../build/module.mk
include ../../build/gccconfig.mk
else
include standalone.mk
endif
IWINFO_LDFLAGS =
IWINFO_CFLAGS = -fstrict-aliasing $(if $(CRAP),-DUSE_WL,-DUSE_MADWIFI)
IWINFO_SO = iwinfo.so
IWINFO_LUA = iwinfo.lua
IWINFO_OBJ = $(if $(CRAP),src/iwinfo_wl.o,src/iwinfo_madwifi.o) \
src/iwinfo_wext.o src/iwinfo_wext_scan.o src/iwinfo_lualib.o
%.o: %.c
$(COMPILE) $(IWINFO_CFLAGS) $(LUA_CFLAGS) $(FPIC) -c -o $@ $<
ifeq ($(SDK),)
compile: clean $(IWINFO_OBJ)
$(LINK) $(SHLIB_FLAGS) $(IWINFO_LDFLAGS) -o src/$(IWINFO_SO) $(IWINFO_OBJ)
mkdir -p dist$(LUA_LIBRARYDIR)
cp src/$(IWINFO_SO) dist$(LUA_LIBRARYDIR)/$(IWINFO_SO)
else
compile: clean
mkdir -p dist$(LUA_LIBRARYDIR)
cp src/dummy.lua dist$(LUA_LIBRARYDIR)/$(IWINFO_LUA)
endif
install: build
cp -pR dist$(LUA_LIBRARYDIR)/* $(LUA_LIBRARYDIR)
clean:
rm -f src/*.o src/$(IWINFO_SO)
host-compile:
|