xref: /titanic_41/usr/src/cmd/ksh/builtins/Makefile (revision e802abbda8c322f24d47835734f4a793ef15ddc8)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21
22#
23# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26
27SHELL=/usr/bin/ksh93
28
29PROG= alias
30ALIASPROG= \
31	bg \
32	cd \
33	command \
34	fc \
35	fg \
36	getopts \
37	hash \
38	jobs \
39	kill \
40	read \
41	rev \
42	sleep \
43	sum \
44	test \
45	type \
46	ulimit \
47	umask \
48	unalias \
49	wait
50
51include ../../Makefile.cmd
52
53ROOTALIASPROG= $(ALIASPROG:%=$(ROOTBIN)/%)
54
55FILEMODE= 555
56OWNER= root
57GROUP= bin
58
59.KEEP_STATE:
60
61all: $(PROG)
62
63$(ROOTBIN)/%: $(ROOTBIN)/alias
64	$(INS.link)
65
66include ../../Makefile.cmd
67
68.KEEP_STATE:
69
70# Set common AST build flags (e.g., needed to support the math stuff).
71include ../../../Makefile.ast
72
73OBJECTS= \
74        alias.o
75
76SRCS=	$(OBJECTS:%.o=%.c)
77
78GROUP= bin
79LDLIBS += -lshell -last
80
81CPPFLAGS = \
82	$(DTEXTDOM) $(DTS_ERRNO) \
83	-I$(ROOT)/usr/include/ast
84
85CFLAGS += \
86	$(ASTCFLAGS)
87CFLAGS64 += \
88	$(ASTCFLAGS64)
89
90ROOTCMDDIR=$(ROOT)/usr/bin
91
92# .WAIT is needed to get the hardlinks properly done
93install: all $(ROOTCMD) .WAIT $(ROOTALIASPROG)
94
95$(PROG):	$(OBJECTS)
96	$(RM) alias
97	$(LINK.c) $(OBJECTS) -o $@ $(LDLIBS)
98	$(POST_PROCESS)
99
100clean clobber:
101	rm -f $(PROG) $(OBJECTS)
102
103lint _msg:
104