# $Id$ ## @file # # kNIX Boostrap Makefile for diffutils # # Copyright (c) 2007 knut st. osmundsen # # # This file is part of kLIBC. # # kLIBC 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. # # kLIBC 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 kLIBC; 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 diffutils template. # TEMPLATE_diffutils = diffutils template TEMPLATE_diffutils_EXTENDS = usr.bin TEMPLATE_diffutils_DEFS = $(TEMPLATE_usr.bin_DEFS) \ LOCALEDIR=\"/@unixroot/usr/share/locale\" \ HAVE_CONFIG_H TEMPLATE_diffutils_INCS = $(TEMPLATE_usr.bin_INCS) \ $(PATH_TARGET) \ $(PATH_SUB_CURRENT) \ $(PATH_SUB_ROOT)/lib TEMPLATE_diffutils_LIBS = $(TEMPLATE_usr.bin_LIBS) \ $(TARGET_libdiffutils) TEMPLATE_diffutils_ORDERDEPS = $(TEMPLATE_usr.bin_ORDERDEPS) \ $(PATH_TARGET)/config.h \ $(PATH_TARGET)/fnmatch.h # # libdiffutils # LIBRARIES += libdiffutils libdiffutils_TEMPLATE = diffutils libdiffutils_NOINST = true libdiffutils_SOURCES = \ lib/basename.c \ lib/c-stack.c \ lib/cmpbuf.c \ lib/error.c \ lib/exclude.c \ lib/exitfail.c \ lib/freesoft.c \ lib/getopt.c \ lib/getopt1.c \ lib/hard-locale.c \ lib/imaxtostr.c \ lib/offtostr.c \ lib/prepargs.c \ lib/posixver.c \ lib/quotesys.c \ lib/setmode.c \ lib/strftime.c \ lib/umaxtostr.c \ lib/xmalloc.c \ lib/xstrtoumax.c \ \ lib/fnmatch.c # # diff # PROGRAMS += diff diff_TEMPLATE = diffutils diff_SOURCES = \ src/diff.c \ src/analyze.c \ src/context.c \ src/dir.c \ src/ed.c \ src/ifdef.c \ src/io.c \ src/normal.c \ src/side.c \ src/util.c \ $(PATH_TARGET)/version.c # # diff3 # PROGRAMS += diff3 diff3_TEMPLATE = diffutils diff3_SOURCES = \ src/diff3.c \ $(PATH_TARGET)/version.c # # diff3 # PROGRAMS += sdiff sdiff_TEMPLATE = diffutils sdiff_SOURCES = \ src/sdiff.c \ $(PATH_TARGET)/version.c # # cmp # PROGRAMS += cmp cmp_TEMPLATE = diffutils cmp_SOURCES = \ src/cmp.c \ $(PATH_TARGET)/version.c # # config.h and version.c # $(PATH_TARGET)/config.h: kNIX-bootstrap-$(BUILD_TARGET).$(BUILD_TARGET_ARCH)-config.h $(INSTALL) $< $@ $(PATH_TARGET)/fnmatch.h: lib/fnmatch.hin $(INSTALL) $< $@ $(PATH_TARGET)/version.c: $(RM) -f $@ $(APPEND) $@ '#include ' $(APPEND) $@ 'char const version_string[] = "(GNU diffutils) 5.8.1";' $(APPEND) $@ '' include $(PATH_KBUILD)/footer.kmk