projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add missing copyright
[openwrt.git]
/
toolchain
/
libnotimpl
/
Makefile
diff --git
a/toolchain/libnotimpl/Makefile
b/toolchain/libnotimpl/Makefile
index
9ae2bf2
..
bc515ca
100644
(file)
--- a/
toolchain/libnotimpl/Makefile
+++ b/
toolchain/libnotimpl/Makefile
@@
-1,30
+1,40
@@
+#
+# 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
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
mkdir -p $(STAGING_DIR)/usr/lib
- cp -fpR $< $@
- touch -c $@
-
-source:
-prepare: $(LIBNOTIMPL_DIR)/.prepared
-compile: $(LIBNOTIMPL_DIR)/libnotimpl.a
-install: $(STAGING_DIR)/usr/lib/libnotimpl.a
-clean:
+ $(CP) $(PKG_BUILD_DIR)/libnotimpl.a $(STAGING_DIR)/usr/lib/
+endef
+
+define Build/Clean
rm -rf \
$(STAGING_DIR)/usr/lib/libnotimpl.a \
rm -rf \
$(STAGING_DIR)/usr/lib/libnotimpl.a \
- $(LIBNOTIMPL_DIR) \
+ $(PKG_BUILD_DIR)
+endef
+
+$(eval $(call HostBuild))
+
This page took
0.029132 seconds
and
4
git commands to generate.