xref: /titanic_50/usr/src/cmd/ksh/builtins/Makefile (revision 7a286c471efbab8562f7655a82931904703fffe0)
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
56
57.KEEP_STATE:
58
59all: $(PROG)
60
61$(ROOTBIN)/%: $(ROOTBIN)/alias
62	$(INS.link)
63
64include ../../Makefile.cmd
65
66.KEEP_STATE:
67
68# Set common AST build flags (e.g., needed to support the math stuff).
69include ../../../Makefile.ast
70
71OBJECTS= \
72        alias.o
73
74SRCS=	$(OBJECTS:%.o=%.c)
75
76LDLIBS += -lshell -last
77
78CPPFLAGS = \
79	$(DTEXTDOM) $(DTS_ERRNO) \
80	-I$(ROOT)/usr/include/ast
81
82CFLAGS += \
83	$(ASTCFLAGS)
84CFLAGS64 += \
85	$(ASTCFLAGS64)
86
87ROOTCMDDIR=$(ROOT)/usr/bin
88
89# .WAIT is needed to get the hardlinks properly done
90install: all $(ROOTCMD) .WAIT $(ROOTALIASPROG)
91
92$(PROG):	$(OBJECTS)
93	$(RM) alias
94	$(LINK.c) $(OBJECTS) -o $@ $(LDLIBS)
95	$(POST_PROCESS)
96
97clean clobber:
98	rm -f $(PROG) $(OBJECTS)
99
100lint _msg:
101