summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-full/Makefile
blob: 819d13f33f3c146ac2fdd7451cb9fb0bc4e5a139 (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
include ../../build/config.mk
include ../../build/module.mk
include ../../build/gccconfig.mk

BWC_LDFLAGS    = -ldl
BWC_CFLAGS     =
BWC_BIN        = luci-bwc
BWC_OBJ        = src/luci-bwc.o

%.o: %.c
	$(COMPILE) $(BWC_CFLAGS) $(LUA_CFLAGS) $(FPIC) -c -o $@ $<

compile: build-clean $(BWC_OBJ)
	$(LINK) -o src/$(BWC_BIN) $(BWC_OBJ) $(BWC_LDFLAGS)
	mkdir -p dist/usr/bin
	cp src/$(BWC_BIN) dist/usr/bin/$(BWC_BIN)

install: build
	cp -pR dist/usr/bin/$(BWC_BIN) /usr/bin/$(BWC_BIN)

clean: build-clean

build-clean:
	rm -f src/*.o src/$(BWC_BIN)