xref: /titanic_44/usr/src/cmd/ls/Makefile.com (revision 28167c24ba5be8b7c1d05e02d053f4a55cd21cc9)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28# cmd/ls/Makefile.com
29#
30
31PROG=		ls
32XPG4PROG=	ls
33XPG6PROG=	ls
34OBJS=           $(PROG).o
35SRCS=           $(OBJS:%.o=../%.c)
36
37include ../../Makefile.cmd
38
39LDLIBS += -lsec
40CFLAGS	+=	$(CCVERBOSE)
41$(XPG4) := CFLAGS += -DXPG4
42
43# Include all XPG4 changes in the XPG6 version
44$(XPG6) := CFLAGS += -DXPG4 -DXPG6
45$(XPG6) := CFLAGS64 += -DXPG4 -DXPG6
46
47CFLAGS64 +=	$(CCVERBOSE)
48CPPFLAGS += -D_FILE_OFFSET_BITS=64
49LINTFLAGS64 +=	-errchk=longptr64
50
51.KEEP_STATE:
52
53all:	$(PROG) $(XPG4) $(XPG6)
54
55lint:	lint_SRCS
56
57clean:
58	$(RM) $(CLEANFILES)
59
60include ../../Makefile.targ
61
62%.xpg4: ../%.c
63	$(LINK.c) -o $@ $< $(LDLIBS)
64	$(POST_PROCESS)
65
66%.xpg6: ../%.c
67	$(LINK.c) -o $@ $< $(LDLIBS)
68	$(POST_PROCESS)
69
70%: ../%.c
71	$(LINK.c) -o $@ $< $(LDLIBS)
72	$(POST_PROCESS)
73