Add libnet package
[openwrt.git] / package / openwrt / wlc / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=wlc
6 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
7
8 EXTRA_CFLAGS := -c -I. -I../include
9
10 all: compile
11
12 WLC_OBJS:=
13 define OBJ_template
14 $(PKG_BUILD_DIR)/$(1): $(PKG_BUILD_DIR)
15 $(TARGET_CC) $(TARGET_CFLAGS) $(EXTRA_CFLAGS) -o $$@ $$(patsubst %.o,%.c,$(1))
16 WLC_OBJS += $(PKG_BUILD_DIR)/$(1)
17 endef
18
19 OBJS := wlc.o
20 $(foreach obj,$(OBJS),$(eval $(call OBJ_template,$(obj))))
21
22 $(PKG_BUILD_DIR):
23 mkdir -p $(PKG_BUILD_DIR)
24
25 $(PKG_BUILD_DIR)/wlc: $(WLC_OBJS)
26 $(TARGET_CC) -o $@ $^ -L$(BUILD_DIR)/libshared -lshared
27
28 $(TARGET_DIR)/usr/sbin/wlc: $(PKG_BUILD_DIR)/wlc
29 install -m 755 $^ $@
30 $(STRIP) $@
31
32 compile: $(PKG_BUILD_DIR)/wlc
33 install: $(TARGET_DIR)/usr/sbin/wlc
34
35 clean:
36 rm -rf $(PKG_BUILD_DIR)
This page took 0.039141 seconds and 5 git commands to generate.