summaryrefslogtreecommitdiff
path: root/tools/cpio/Makefile
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-07-29 15:25:12 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2010-07-29 15:25:12 +0200
commitfd6481d82ff407139157e53df28563d40bb3ad3b (patch)
treeed2ae9e08c31d1eed424793272a60c25cdec6c00 /tools/cpio/Makefile
parent14804005d5b33beb6f52d4a72034acb00c00eb90 (diff)
add a cpio implementation to tools directory
cpio utility is a mess in point of portability. For example NetBSD cpio implementation does not support userid and groupid changes for the archive. This feature is required for initramfs filesystem targets. This cpio is from the Heirloom project. Fix needed rebuild of tools, when changing targets.
Diffstat (limited to 'tools/cpio/Makefile')
-rw-r--r--tools/cpio/Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/tools/cpio/Makefile b/tools/cpio/Makefile
new file mode 100644
index 000000000..e9533a498
--- /dev/null
+++ b/tools/cpio/Makefile
@@ -0,0 +1,33 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+SRCS+= \
+ src/ib_open.c \
+ src/ib_close.c \
+ src/ib_read.c \
+ src/ib_alloc.c \
+ src/ib_free.c \
+ src/ib_getlin.c \
+ src/sfile.c \
+ src/gmatch.c
+
+SRCS+= \
+ src/version.c \
+ src/blast.c \
+ src/crc32.c \
+ src/expand.c \
+ src/explode.c \
+ src/flags.c \
+ src/inflate.c \
+ src/unshrink.c \
+ src/nonpax.c \
+ src/cpio.c
+
+${STAGING_TOOLS}/bin/cpio: ${SRCS}
+ ${HOSTCC} ${HOSTCFLAGS} -D_GNU_SOURCE -Isrc -o $@ $^
+
+install: ${STAGING_TOOLS}/bin/cpio
+
+include $(TOPDIR)/mk/tools.mk