8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / shcomp / Makefile
blob03fd75278448f72cb222b880193a232f2f50ed4b
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
23 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
27 SHELL=/usr/bin/ksh93
29 include ../Makefile.cmd
30 $(SPARC_BLD)include ../Makefile.cmd.64
32 .KEEP_STATE:
34 # Set common AST build flags (e.g., needed to support the math stuff).
35 include ../../Makefile.ast
37 OBJECTS= \
38 shcomp.o
40 LIBSHELLMACH=$(MACH)
41 LIBSHELLBASE=../../lib/libshell
42 LIBSHELLSRC=$(LIBSHELLBASE)/common/sh
44 SRCS= $(OBJECTS:%.o=$(LIBSHELLSRC)/%.c)
46 LDLIBS += -lshell -last
48 # 1. Make sure that the -D/-U defines in CFLAGS below are in sync
49 # with usr/src/lib/libshell/Makefile.com
50 # 2. We use "=" here since using $(CPPFLAGS.master) is very tricky in our
51 # case - it MUST come as the last element but future changes in -D options
52 # may then cause silent breakage in the AST sources because the last -D
53 # option specified overrides previous -D options so we prefer the current
54 # way to explicitly list each single flag.
55 CPPFLAGS = \
56 $(DTEXTDOM) $(DTS_ERRNO) \
57 $(LIBSHELLCPPFLAGS)
59 CFLAGS += \
60 $(ASTCFLAGS)
61 CFLAGS64 += \
62 $(ASTCFLAGS64)
64 CERRWARN += -_gcc=-Wno-parentheses
66 ROOTCMDDIR=$(ROOT)/usr/bin
68 PROG= shcomp
70 %.o: $(LIBSHELLSRC)/%.c
71 $(COMPILE.c) -c -o $@ $<
72 $(POST_PROCESS_O)
74 all: $(PROG)
76 # dummy file since AST/ksh/shcomp doesn't use *.po files
77 # (and "shcomp" is just a frontend which calls directly into libshell,
78 # e.g. there are no l10n strings here)
79 $(PROG).po:
80 $(RM) $(PROG).po ; \
81 $(TOUCH) $(PROG).po
84 install: all $(ROOTCMD)
86 $(PROG): $(OBJECTS)
87 $(RM) shcomp
88 $(LINK.c) $(OBJECTS) -o $@ $(LDLIBS)
89 $(POST_PROCESS)
91 clean:
92 $(RM) $(OBJECTS)
94 lint:
96 include ../Makefile.targ