X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=toolchain%2Flibnotimpl%2FMakefile;h=85156723be8f4c89a79f4973fa59cf49ad49e643;hb=5b9d06e88ec9c98eb3758991ab22eb9d0813e70b;hp=86ab927c1244e7a1c3a62836425636f70557498a;hpb=06265758beb1721526360aa01176dd70d8a9e1d4;p=openwrt-10.03%2F.git diff --git a/toolchain/libnotimpl/Makefile b/toolchain/libnotimpl/Makefile index 86ab927c1..85156723b 100644 --- a/toolchain/libnotimpl/Makefile +++ b/toolchain/libnotimpl/Makefile @@ -1,30 +1,39 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk -LIBNOTIMPL_DIR:=$(TOOL_BUILD_DIR)/libnotimpl +PKG_NAME:=libnotimpl -LIBNOTIMPL_SRCS+=./files/math.c -LIBNOTIMPL_OBJS:=$(patsubst ./files/%.c,$(LIBNOTIMPL_DIR)/%.o,$(LIBNOTIMPL_SRCS)) +PKG_BUILD_DIR:=$(TOOLCHAIN_BUILD_DIR)/libnotimpl -$(LIBNOTIMPL_DIR)/.prepared: - mkdir -p $(LIBNOTIMPL_DIR) - touch $@ +include $(INCLUDE_DIR)/host-build.mk -$(LIBNOTIMPL_OBJS): $(LIBNOTIMPL_DIR)/%.o : ./files/%.c - $(TARGET_CC) $(TARGET_CFLAGS) -c $< -o $@ +define cc + $(TARGET_CC) $(TARGET_CFLAGS) -c src/$(1).c -o $(PKG_BUILD_DIR)/$(1).o +endef -$(LIBNOTIMPL_DIR)/libnotimpl.a: $(LIBNOTIMPL_OBJS) - $(TARGET_CROSS)ar rc $(LIBNOTIMPL_DIR)/libnotimpl.a $(LIBNOTIMPL_OBJS) +define Build/Prepare + rm -rf $(PKG_BUILD_DIR) + mkdir -p $(PKG_BUILD_DIR) +endef -$(STAGING_DIR)/usr/lib/libnotimpl.a: $(LIBNOTIMPL_DIR)/libnotimpl.a +define Build/Compile + $(call cc,math) + $(TARGET_CROSS)ar rc $(PKG_BUILD_DIR)/libnotimpl.a $(PKG_BUILD_DIR)/*.o +endef + +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 - rm -rf \ - $(STAGING_DIR)/usr/lib/libnotimpl.a \ - $(LIBNOTIMPL_DIR) \ + $(CP) $(PKG_BUILD_DIR)/libnotimpl.a $(STAGING_DIR)/usr/lib/ +endef + +define Build/Clean + rm -f $(STAGING_DIR)/usr/lib/libnotimpl.a +endef + +$(eval $(call HostBuild)) +