xref: /titanic_52/usr/src/cmd/ast/ksh/builtins/Makefile (revision 906afcb89d0412cc073b95c2d701a804a8cdb62c)
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
27#
28# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
29# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
30#
31
32PROG= alias
33ALIASPROG= \
34	bg \
35	cd \
36	cksum \
37	cmp \
38	comm \
39	command \
40	cut \
41	fc \
42	fg \
43	getopts \
44	hash \
45	jobs \
46	join \
47	kill \
48	logname \
49	paste \
50	print \
51	read \
52	rev \
53	sleep \
54	sum \
55	tee \
56	test \
57	type \
58	ulimit \
59	umask \
60	unalias \
61	uniq \
62	wait \
63	wc
64
65XPG4ALIASPROG= \
66	alias \
67	bg \
68	cd \
69	command \
70	fc \
71	fg \
72	getopts \
73	hash \
74	jobs \
75	kill \
76	read \
77	test \
78	type \
79	ulimit \
80	umask \
81	unalias \
82	wait
83
84XPG4SH= \
85	sh
86
87ROOTXPG4ALIAS= \
88	$(XPG4SH:%=$(ROOTXPG4BIN)/%) $(XPG4ALIASPROG:%=$(ROOTXPG4BIN)/%)
89ROOTALIASPROG= $(ALIASPROG:%=$(ROOTBIN)/%)
90
91include ../../../Makefile.cmd
92$(SPARC_BLD)include ../../../Makefile.cmd.64
93
94FILEMODE= 555
95CERRWARN += -_gcc=-Wno-parentheses
96
97.KEEP_STATE:
98
99all: $(PROG)
100
101$(XPG4ALIASPROG:%=$(ROOTXPG4BIN)/%):
102	$(RM) $@; $(SYMLINK) ../../bin/alias $@
103
104$(XPG4SH:%=$(ROOTXPG4BIN)/%):
105	$(RM) $@; $(SYMLINK) ../../bin/ksh93 $@
106
107$(ALIASPROG:%=$(ROOTBIN)/%): $(ROOTPROG)
108	$(RM) $@; $(LN) $(ROOTPROG) $@
109
110.KEEP_STATE:
111
112# Set common AST build flags (e.g., needed to support the math stuff).
113include ../../Makefile.ast
114
115
116ASTSRC= $(C_AST)/src/cmd/ksh93
117
118OBJECTS= \
119        alias.o
120
121SRCS=	$(OBJECTS:%.o=%.c)
122
123LDLIBS += -lshell -lcmd -last -lumem
124
125CPPFLAGS= \
126	$(DTEXTDOM) $(DTS_ERRNO) \
127	-I$(ASTSRC)/include \
128	-I$(AST)/libshell/$(MACH) \
129	-I$(ROOT)/usr/include/ast \
130	-I$(ROOT)/usr/include
131
132CFLAGS += $(ASTCFLAGS)
133CFLAGS64 += $(ASTCFLAGS64)
134
135ROOTCMDDIR=$(ROOT)/usr/bin
136
137install: all $(ROOTPROG) $(ROOTXPG4PROG) $(ROOTALIASPROG) $(ROOTXPG4ALIAS)
138
139$(PROG):	$(OBJECTS)
140	$(RM) alias
141	$(LINK.c) $(OBJECTS) -o $@ $(LDLIBS)
142	$(POST_PROCESS)
143
144clean clobber:
145	rm -f $(PROG) $(OBJECTS)
146
147_msg:
148