2005-03-08 01:24:52 +02:00
|
|
|
# $Id$
|
2005-03-19 16:40:56 +02:00
|
|
|
|
2005-03-08 01:24:52 +02:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=libshared
|
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
|
|
|
|
|
|
|
EXTRA_CFLAGS := -c -I. -I../include
|
|
|
|
|
|
|
|
all: compile
|
|
|
|
|
|
|
|
LIBSHARED_OBJS:=
|
|
|
|
define OBJ_template
|
|
|
|
$(PKG_BUILD_DIR)/$(1): $(PKG_BUILD_DIR)
|
|
|
|
$(TARGET_CC) $(TARGET_CFLAGS) $(EXTRA_CFLAGS) -o $$@ $$(patsubst %.o,%.c,$(1))
|
|
|
|
LIBSHARED_OBJS += $(PKG_BUILD_DIR)/$(1)
|
|
|
|
endef
|
|
|
|
|
|
|
|
OBJS := shutils.o wl.o wl_linux.o defaults.o linux_timer.o
|
|
|
|
$(foreach obj,$(OBJS),$(eval $(call OBJ_template,$(obj))))
|
|
|
|
|
|
|
|
|
|
|
|
$(PKG_BUILD_DIR):
|
|
|
|
mkdir -p $(PKG_BUILD_DIR)
|
|
|
|
|
|
|
|
$(PKG_BUILD_DIR)/libshared.so: $(LIBSHARED_OBJS)
|
|
|
|
$(TARGET_CC) -shared -o $@ $^
|
|
|
|
|
2005-06-12 00:13:46 +03:00
|
|
|
$(STAGING_DIR)/lib/libshared.so: $(PKG_BUILD_DIR)/libshared.so
|
|
|
|
install -m 644 $< $@
|
|
|
|
|
2005-03-08 01:24:52 +02:00
|
|
|
$(TARGET_DIR)/usr/lib/libshared.so: $(PKG_BUILD_DIR)/libshared.so
|
|
|
|
install -m 644 $^ $@
|
|
|
|
$(STRIP) $@
|
|
|
|
|
2005-06-12 00:13:46 +03:00
|
|
|
compile: $(PKG_BUILD_DIR)/libshared.so $(STAGING_DIR)/lib/libshared.so
|
2005-03-08 01:24:52 +02:00
|
|
|
install: $(TARGET_DIR)/usr/lib/libshared.so
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf $(PKG_BUILD_DIR)
|