add SIOCSIWAP to wlcompat
[openwrt.git] / package / openwrt / libshared / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=libshared
6 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
7
8 EXTRA_CFLAGS := -c -I. -I../include
9
10 all: compile
11
12 LIBSHARED_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 LIBSHARED_OBJS += $(PKG_BUILD_DIR)/$(1)
17 endef
18
19 OBJS := shutils.o wl.o wl_linux.o defaults.o linux_timer.o
20 $(foreach obj,$(OBJS),$(eval $(call OBJ_template,$(obj))))
21
22
23 $(PKG_BUILD_DIR):
24 mkdir -p $(PKG_BUILD_DIR)
25
26 $(PKG_BUILD_DIR)/libshared.so: $(LIBSHARED_OBJS)
27 $(TARGET_CC) -shared -o $@ $^
28
29 $(TARGET_DIR)/usr/lib/libshared.so: $(PKG_BUILD_DIR)/libshared.so
30 install -m 644 $^ $@
31 install -m 644 $^ $(STAGING_DIR)/lib/libshared.so
32 $(STRIP) $@
33
34 compile: $(PKG_BUILD_DIR)/libshared.so
35 install: $(TARGET_DIR)/usr/lib/libshared.so
36
37 clean:
38 rm -rf $(PKG_BUILD_DIR)
This page took 0.042556 seconds and 5 git commands to generate.