From 13078b79e500d9cb914b29c9d6a8a54185fe213c Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 21 Jun 2006 06:19:43 +0000 Subject: massive cleanup of toolchain/ git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4038 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- toolchain/libnotimpl/Makefile | 44 +++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) (limited to 'toolchain/libnotimpl/Makefile') diff --git a/toolchain/libnotimpl/Makefile b/toolchain/libnotimpl/Makefile index 86ab927c12..aae7aef34a 100644 --- a/toolchain/libnotimpl/Makefile +++ b/toolchain/libnotimpl/Makefile @@ -1,30 +1,34 @@ include $(TOPDIR)/rules.mk -LIBNOTIMPL_DIR:=$(TOOL_BUILD_DIR)/libnotimpl +PKG_NAME := libnotimpl +PKG_BUILD_DIR := $(TOOL_BUILD_DIR)/libnotimpl -LIBNOTIMPL_SRCS+=./files/math.c -LIBNOTIMPL_OBJS:=$(patsubst ./files/%.c,$(LIBNOTIMPL_DIR)/%.o,$(LIBNOTIMPL_SRCS)) +include $(INCLUDE_DIR)/host-build.mk -$(LIBNOTIMPL_DIR)/.prepared: - mkdir -p $(LIBNOTIMPL_DIR) - touch $@ +define cc + $(TARGET_CC) $(TARGET_CFLAGS) -c src/$(1).c -o $(PKG_BUILD_DIR)/$(1).o +endef -$(LIBNOTIMPL_OBJS): $(LIBNOTIMPL_DIR)/%.o : ./files/%.c - $(TARGET_CC) $(TARGET_CFLAGS) -c $< -o $@ +define Build/Prepare + rm -rf $(PKG_BUILD_DIR) + mkdir -p $(PKG_BUILD_DIR) +endef -$(LIBNOTIMPL_DIR)/libnotimpl.a: $(LIBNOTIMPL_OBJS) - $(TARGET_CROSS)ar rc $(LIBNOTIMPL_DIR)/libnotimpl.a $(LIBNOTIMPL_OBJS) +define Build/Compile + $(call cc,math) + $(TARGET_CROSS)ar rc $(PKG_BUILD_DIR)/libnotimpl.a $(PKG_BUILD_DIR)/*.o +endef -$(STAGING_DIR)/usr/lib/libnotimpl.a: $(LIBNOTIMPL_DIR)/libnotimpl.a +define Build/Install mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $< $@ - touch -c $@ - -source: -prepare: $(LIBNOTIMPL_DIR)/.prepared -compile: $(LIBNOTIMPL_DIR)/libnotimpl.a -install: $(STAGING_DIR)/usr/lib/libnotimpl.a -clean: FORCE + $(CP) $(PKG_BUILD_DIR)/libnotimpl.a $(STAGING_DIR)/usr/lib/ +endef + +define Build/Clean rm -rf \ $(STAGING_DIR)/usr/lib/libnotimpl.a \ - $(LIBNOTIMPL_DIR) \ + $(PKG_BUILD_DIR) +endef + +$(eval $(call HostBuild)) + -- cgit v1.2.3