From 94266d638908a140ef5cdd9b27d2eb367f97249f Mon Sep 17 00:00:00 2001 From: nbd 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 +++++++++++++------------ toolchain/libnotimpl/files/math.c | 68 --------------------------------------- toolchain/libnotimpl/src/math.c | 68 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 92 insertions(+), 88 deletions(-) delete mode 100644 toolchain/libnotimpl/files/math.c create mode 100644 toolchain/libnotimpl/src/math.c (limited to 'toolchain/libnotimpl') diff --git a/toolchain/libnotimpl/Makefile b/toolchain/libnotimpl/Makefile index 86ab927c1..aae7aef34 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)) + diff --git a/toolchain/libnotimpl/files/math.c b/toolchain/libnotimpl/files/math.c deleted file mode 100644 index a16ea740e..000000000 --- a/toolchain/libnotimpl/files/math.c +++ /dev/null @@ -1,68 +0,0 @@ -/* vi: set sw=4 ts=4: */ - -#include "math.h" - - -/* cosf for uClibc - * - * wrapper for cos(x) - */ - -#ifdef __STDC__ - float cosf(float x) -#else - float cosf(x) - float x; -#endif -{ - return (float) cos( (double)x ); -} - - -/* sinf for uClibc - * - * wrapper for sin(x) - */ - -#ifdef __STDC__ - float sinf(float x) -#else - float sinf(x) - float x; -#endif -{ - return (float) sin( (double)x ); -} - - -/* ceilf for uClibc - * - * wrapper for ceil(x) - */ - -#ifdef __STDC__ - float ceilf(float x) -#else - float rintf(x) - float x; -#endif -{ - return (float) ceil( (double)x ); -} - - -/* rintf for uClibc - * - * wrapper for rint(x) - */ - -#ifdef __STDC__ - float rintf(float x) -#else - float rintf(x) - float x; -#endif -{ - return (float) sin( (double)x ); -} - diff --git a/toolchain/libnotimpl/src/math.c b/toolchain/libnotimpl/src/math.c new file mode 100644 index 000000000..a16ea740e --- /dev/null +++ b/toolchain/libnotimpl/src/math.c @@ -0,0 +1,68 @@ +/* vi: set sw=4 ts=4: */ + +#include "math.h" + + +/* cosf for uClibc + * + * wrapper for cos(x) + */ + +#ifdef __STDC__ + float cosf(float x) +#else + float cosf(x) + float x; +#endif +{ + return (float) cos( (double)x ); +} + + +/* sinf for uClibc + * + * wrapper for sin(x) + */ + +#ifdef __STDC__ + float sinf(float x) +#else + float sinf(x) + float x; +#endif +{ + return (float) sin( (double)x ); +} + + +/* ceilf for uClibc + * + * wrapper for ceil(x) + */ + +#ifdef __STDC__ + float ceilf(float x) +#else + float rintf(x) + float x; +#endif +{ + return (float) ceil( (double)x ); +} + + +/* rintf for uClibc + * + * wrapper for rint(x) + */ + +#ifdef __STDC__ + float rintf(float x) +#else + float rintf(x) + float x; +#endif +{ + return (float) sin( (double)x ); +} + -- cgit v1.2.3