copy uclibc++ package from whiterussian to head
[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 $(STAGING_DIR)/lib/libshared.so: $(PKG_BUILD_DIR)/libshared.so
30 install -m 644 $< $@
31
32 $(TARGET_DIR)/usr/lib/libshared.so: $(PKG_BUILD_DIR)/libshared.so
33 install -m 644 $^ $@
34 $(STRIP) $@
35
36 compile: $(PKG_BUILD_DIR)/libshared.so $(STAGING_DIR)/lib/libshared.so
37 install: $(TARGET_DIR)/usr/lib/libshared.so
38
39 clean:
40 rm -rf $(PKG_BUILD_DIR)
This page took 0.048621 seconds and 5 git commands to generate.