| 1 | # $Id: kNIX-bootstrap.kmk 3845 2014-03-16 20:31:39Z bird $ | 
|---|
| 2 | ## @file | 
|---|
| 3 | # | 
|---|
| 4 | # kNIX Boostrap Makefile for diffutils | 
|---|
| 5 | # | 
|---|
| 6 | # Copyright (c) 2007 knut st. osmundsen <bird-src-spam@anduin.net> | 
|---|
| 7 | # | 
|---|
| 8 | # | 
|---|
| 9 | # This file is part of kLIBC. | 
|---|
| 10 | # | 
|---|
| 11 | # kLIBC is free software; you can redistribute it and/or modify | 
|---|
| 12 | # it under the terms of the GNU General Public License as published by | 
|---|
| 13 | # the Free Software Foundation; either version 2 of the License, or | 
|---|
| 14 | # (at your option) any later version. | 
|---|
| 15 | # | 
|---|
| 16 | # kLIBC is distributed in the hope that it will be useful, | 
|---|
| 17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
| 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|---|
| 19 | # GNU General Public License for more details. | 
|---|
| 20 | # | 
|---|
| 21 | # You should have received a copy of the GNU General Public License | 
|---|
| 22 | # along with kLIBC; if not, write to the Free Software | 
|---|
| 23 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA | 
|---|
| 24 | # | 
|---|
| 25 | # | 
|---|
| 26 |  | 
|---|
| 27 | DEPTH = ../../.. | 
|---|
| 28 | include $(PATH_KBUILD)/header.kmk | 
|---|
| 29 |  | 
|---|
| 30 | # | 
|---|
| 31 | # The diffutils template. | 
|---|
| 32 | # | 
|---|
| 33 | TEMPLATE_diffutils = diffutils template | 
|---|
| 34 | TEMPLATE_diffutils_EXTENDS = usr.bin | 
|---|
| 35 | TEMPLATE_diffutils_DEFS = $(TEMPLATE_usr.bin_DEFS) \ | 
|---|
| 36 | LOCALEDIR=\"/@unixroot/usr/share/locale\" \ | 
|---|
| 37 | HAVE_CONFIG_H | 
|---|
| 38 | TEMPLATE_diffutils_INCS = $(TEMPLATE_usr.bin_INCS) \ | 
|---|
| 39 | $(PATH_TARGET) \ | 
|---|
| 40 | $(PATH_SUB_CURRENT) \ | 
|---|
| 41 | $(PATH_SUB_ROOT)/lib | 
|---|
| 42 | TEMPLATE_diffutils_LIBS = $(TEMPLATE_usr.bin_LIBS) \ | 
|---|
| 43 | $(TARGET_libdiffutils) | 
|---|
| 44 | TEMPLATE_diffutils_ORDERDEPS = $(TEMPLATE_usr.bin_ORDERDEPS) \ | 
|---|
| 45 | $(PATH_TARGET)/config.h \ | 
|---|
| 46 | $(PATH_TARGET)/fnmatch.h | 
|---|
| 47 |  | 
|---|
| 48 | # | 
|---|
| 49 | # libdiffutils | 
|---|
| 50 | # | 
|---|
| 51 | LIBRARIES += libdiffutils | 
|---|
| 52 | libdiffutils_TEMPLATE = diffutils | 
|---|
| 53 | libdiffutils_NOINST = true | 
|---|
| 54 | libdiffutils_SOURCES = \ | 
|---|
| 55 | lib/basename.c \ | 
|---|
| 56 | lib/c-stack.c \ | 
|---|
| 57 | lib/cmpbuf.c \ | 
|---|
| 58 | lib/error.c \ | 
|---|
| 59 | lib/exclude.c \ | 
|---|
| 60 | lib/exitfail.c \ | 
|---|
| 61 | lib/freesoft.c \ | 
|---|
| 62 | lib/getopt.c \ | 
|---|
| 63 | lib/getopt1.c \ | 
|---|
| 64 | lib/hard-locale.c \ | 
|---|
| 65 | lib/imaxtostr.c \ | 
|---|
| 66 | lib/offtostr.c \ | 
|---|
| 67 | lib/prepargs.c \ | 
|---|
| 68 | lib/posixver.c \ | 
|---|
| 69 | lib/quotesys.c \ | 
|---|
| 70 | lib/setmode.c \ | 
|---|
| 71 | lib/strftime.c \ | 
|---|
| 72 | lib/umaxtostr.c \ | 
|---|
| 73 | lib/xmalloc.c \ | 
|---|
| 74 | lib/xstrtoumax.c \ | 
|---|
| 75 | \ | 
|---|
| 76 | lib/fnmatch.c | 
|---|
| 77 |  | 
|---|
| 78 | # | 
|---|
| 79 | # diff | 
|---|
| 80 | # | 
|---|
| 81 | PROGRAMS += diff | 
|---|
| 82 | diff_TEMPLATE = diffutils | 
|---|
| 83 | diff_SOURCES = \ | 
|---|
| 84 | src/diff.c \ | 
|---|
| 85 | src/analyze.c \ | 
|---|
| 86 | src/context.c \ | 
|---|
| 87 | src/dir.c \ | 
|---|
| 88 | src/ed.c \ | 
|---|
| 89 | src/ifdef.c \ | 
|---|
| 90 | src/io.c \ | 
|---|
| 91 | src/normal.c \ | 
|---|
| 92 | src/side.c \ | 
|---|
| 93 | src/util.c \ | 
|---|
| 94 | $(PATH_TARGET)/version.c | 
|---|
| 95 |  | 
|---|
| 96 | # | 
|---|
| 97 | # diff3 | 
|---|
| 98 | # | 
|---|
| 99 | PROGRAMS += diff3 | 
|---|
| 100 | diff3_TEMPLATE = diffutils | 
|---|
| 101 | diff3_SOURCES = \ | 
|---|
| 102 | src/diff3.c \ | 
|---|
| 103 | $(PATH_TARGET)/version.c | 
|---|
| 104 |  | 
|---|
| 105 | # | 
|---|
| 106 | # diff3 | 
|---|
| 107 | # | 
|---|
| 108 | PROGRAMS += sdiff | 
|---|
| 109 | sdiff_TEMPLATE = diffutils | 
|---|
| 110 | sdiff_SOURCES = \ | 
|---|
| 111 | src/sdiff.c \ | 
|---|
| 112 | $(PATH_TARGET)/version.c | 
|---|
| 113 |  | 
|---|
| 114 | # | 
|---|
| 115 | # cmp | 
|---|
| 116 | # | 
|---|
| 117 | PROGRAMS += cmp | 
|---|
| 118 | cmp_TEMPLATE = diffutils | 
|---|
| 119 | cmp_SOURCES = \ | 
|---|
| 120 | src/cmp.c \ | 
|---|
| 121 | $(PATH_TARGET)/version.c | 
|---|
| 122 |  | 
|---|
| 123 | # | 
|---|
| 124 | # config.h and version.c | 
|---|
| 125 | # | 
|---|
| 126 | $(PATH_TARGET)/config.h: kNIX-bootstrap-$(BUILD_TARGET).$(BUILD_TARGET_ARCH)-config.h | 
|---|
| 127 | $(INSTALL) $< $@ | 
|---|
| 128 |  | 
|---|
| 129 | $(PATH_TARGET)/fnmatch.h: lib/fnmatch.hin | 
|---|
| 130 | $(INSTALL) $< $@ | 
|---|
| 131 |  | 
|---|
| 132 | $(PATH_TARGET)/version.c: | 
|---|
| 133 | $(RM) -f $@ | 
|---|
| 134 | $(APPEND) $@ '#include <config.h>' | 
|---|
| 135 | $(APPEND) $@ 'char const version_string[] = "(GNU diffutils) 5.8.1";' | 
|---|
| 136 | $(APPEND) $@ '' | 
|---|
| 137 |  | 
|---|
| 138 | include $(PATH_KBUILD)/footer.kmk | 
|---|
| 139 |  | 
|---|