source: trunk/src/sed/Makefile.kmk@ 2506

Last change on this file since 2506 was 2506, checked in by bird, 14 years ago

Solaris 10 build fixes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.4 KB
Line 
1# $Id: Makefile.kmk 2506 2011-07-23 10:58:06Z bird $
2## @file
3# Sub-Makefile for kmk_sed.
4#
5
6#
7# Copyright (c) 2006-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
8#
9# This file is part of kBuild.
10#
11# kBuild 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 3 of the License, or
14# (at your option) any later version.
15#
16# kBuild 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 kBuild. If not, see <http://www.gnu.org/licenses/>
23#
24#
25
26SUB_DEPTH = ../..
27include $(KBUILD_PATH)/subheader.kmk
28
29#
30# kmk_sed
31#
32PROGRAMS += kmk_sed
33
34kmk_sed_TEMPLATE = BIN
35kmk_sed_DEPS = \
36 $(kmk_sed_0_OUTDIR)/config.h \
37 $(kmk_sed_0_OUTDIR)/regex.h
38kmk_sed_CLEAN = $(kmk_sed_DEPS)
39kmk_sed_INCS = \
40 $(kmk_sed_0_OUTDIR) \
41 . \
42 lib \
43 intl
44kmk_sed_DEFS = \
45 HAVE_CONFIG_H
46ifdef KBUILD_SOLARIS_10
47 kmk_sed_CFLAGS += -std=gnu99
48endif
49kmk_sed_SOURCES = \
50 sed/sed.c \
51 lib/regex.c \
52 sed/compile.c \
53 sed/execute.c \
54 sed/regexp.c \
55 sed/fmt.c \
56 sed/mbcs.c \
57 lib/getopt1.c \
58 lib/getopt.c \
59 lib/utils.c
60kmk_sed_SOURCES.darwin = \
61 lib/strverscmp.c \
62 lib/obstack.c \
63 lib/getline.c
64kmk_sed_SOURCES.dragonfly = \
65 lib/strverscmp.c \
66 lib/obstack.c \
67 lib/getline.c
68kmk_sed_SOURCES.freebsd = \
69 lib/strverscmp.c \
70 lib/obstack.c \
71 lib/getline.c
72kmk_sed_SOURCES.openbsd = \
73 lib/strverscmp.c \
74 lib/obstack.c \
75 lib/getline.c
76kmk_sed_SOURCES.solaris = \
77 lib/strverscmp.c \
78 lib/obstack.c
79ifdef KBUILD_SOLARIS_10
80kmk_sed_SOURCES.solaris += \
81 lib/getline.c
82endif
83kmk_sed_SOURCES.win = \
84 lib/strverscmp.c \
85 lib/obstack.c \
86 lib/mkstemp.c \
87 lib/getline.c \
88 ../lib/startuphacks-win.c
89
90include $(FILE_KBUILD_SUB_FOOTER)
91
92#
93# Use checked in config.h instead of running ./configure for it.
94#
95kmk_sed_config.h.$(KBUILD_TARGET) := $(kmk_sed_DEFPATH)/config.h.$(KBUILD_TARGET)
96
97$(kmk_sed_0_OUTDIR)/config.h: $(kmk_sed_config.h.$(KBUILD_TARGET)) | $(call DIRDEP,$(kmk_sed_0_OUTDIR))
98 $(CP) -f $^ $@
99
100#
101# Use the regex lib shipped with sed and not anything installed on the system.
102#
103$(kmk_sed_0_OUTDIR)/regex.h: $(kmk_sed_DEFPATH)/lib/regex_.h | $(call DIRDEP,$(kmk_sed_0_OUTDIR))
104 $(CP) -f $^ $@
105
Note: See TracBrowser for help on using the repository browser.