# $Id: kNIX-bootstrap.kmk 3168 2007-04-22 02:45:50Z bird $ ## @file # # kNIX Boostrap Makefile for cpio # # Copyright (c) 2007 knut st. osmundsen # # # This file is part of kNIX. # # kNIX is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # kNIX is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with kNIX; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # DEPTH = ../../.. include $(PATH_KBUILD)/header.kmk # # The cpio template. # TEMPLATE_cpio = cpio template TEMPLATE_cpio_EXTENDS = usr.bin TEMPLATE_cpio_DEFS = $(TEMPLATE_usr.bin_DEFS) \ HAVE_CONFIG_H TEMPLATE_cpio_INCS = $(TEMPLATE_usr.bin_INCS) \ $(PATH_TARGET) \ $(PATH_SUB_ROOT) \ $(PATH_SUB_ROOT)/lib TEMPLATE_cpio_ORDERDEPS = $(TEMPLATE_usr.bin_ORDERDEPS) \ $(PATH_TARGET)/config.h \ $(PATH_TARGET)/fnmatch.h \ $(PATH_TARGET)/getopt.h # # libcpio - internal library. # LIBRARIES += libcpio libcpio_TEMPLATE = cpio libcpio_NOINST = yes libcpio_SOURCES = \ lib/fatal.c \ lib/rtapelib.c \ lib/paxerror.c \ lib/paxexit.c \ lib/paxconvert.c \ lib/paxnames.c \ lib/allocsa.c \ lib/argp-ba.c \ lib/argp-eexst.c \ lib/argp-fmtstream.c \ lib/argp-fs-xinl.c \ lib/argp-help.c \ lib/argp-parse.c \ lib/argp-pin.c \ lib/argp-pv.c \ lib/argp-pvh.c \ lib/argp-xinl.c \ lib/full-write.c \ lib/getdate.c \ lib/strnlen1.c \ lib/version-etc.c \ lib/version-etc-fsf.c \ lib/xalloc-die.c \ lib/xstrndup.c \ lib/getopt.c \ lib/getopt1.c \ lib/save-cwd.c \ lib/argmatch.c \ lib/chdir-long.c \ lib/mkdirat.c \ lib/fchmodat.c \ lib/openat-die.c \ lib/openat.c \ lib/close-stream.c \ lib/closeout.c \ lib/basename.c \ lib/dirname.c \ lib/stripslash.c \ lib/exitfail.c \ lib/open-safer.c \ lib/creat-safer.c \ lib/fnmatch.c \ lib/getcwd.c \ lib/gettime.c \ lib/hash.c \ lib/imaxtostr.c \ lib/offtostr.c \ lib/umaxtostr.c \ lib/mbchar.c \ lib/quote.c \ lib/quotearg.c \ lib/safe-read.c \ lib/safe-write.c \ lib/savedir.c \ lib/strcasecmp.c \ lib/dup-safer.c \ lib/fd-safer.c \ lib/pipe-safer.c \ lib/utimens.c \ lib/vasnprintf.c \ lib/printf-args.c \ lib/printf-parse.c \ lib/asnprintf.c \ lib/xmalloc.c \ lib/xgetcwd.c \ # # cpio # PROGRAMS += cpio cpio_TEMPLATE = cpio cpio_INCS = src cpio_SOURCES = \ src/main.c \ src/copyin.c \ src/copyout.c \ src/copypass.c \ src/defer.c \ src/dstring.c \ src/filemode.c \ src/global.c \ src/idcache.c \ src/makepath.c \ src/tar.c \ src/userspec.c \ src/util.c cpio_LIBS = $(TARGET_libcpio) # # The cpio man pages. # INSTALLS += cpio-manpages cpio-manpages_TEMPLATE = usr.bin.man cpio-manpages_SOURCES = \ doc/cpio.1 # # config.h, fnmatch.h, getopt.h # $(PATH_TARGET)/config.h: kNIX-bootstrap-$(BUILD_TARGET).$(BUILD_TARGET_ARCH)-config.h | $(call DIRDEP,$(PATH_TARGET)) $(INSTALL) $< $@ $(PATH_TARGET)/fnmatch.h: lib/fnmatch_.h | $(call DIRDEP,$(PATH_TARGET)) $(INSTALL) $< $@ $(PATH_TARGET)/getopt.h: lib/getopt_.h | $(call DIRDEP,$(PATH_TARGET)) $(INSTALL) $< $@ include $(PATH_KBUILD)/footer.kmk