8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / expr / Makefile
blobdbc390fce5b2321de86c5232eff9dba12acc1be3
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
22 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
25 PROG= expr
26 XPG4PROG= expr
27 XPG6PROG= expr
29 EXPROBJ= exprobjs/expr.o exprobjs/compile.o
30 XPG4EXPROBJ= exprobjs.xpg4/expr.o exprobjs.xpg4/compile.o
31 XPG6EXPROBJ= exprobjs.xpg6/expr.o exprobjs.xpg6/compile.o
33 OBJS= $(EXPROBJ) $(XPG4EXPROBJ) $(XPG6EXPROBJ)
34 SRCS= expr.c compile.c
36 include ../Makefile.cmd
38 CFLAGS += $(CCVERBOSE)
39 CERRWARN += -_gcc=-Wno-uninitialized
40 CERRWARN += -_gcc=-Wno-extra
41 $(XPG4) := CFLAGS += -DXPG4
42 $(XPG6) := CFLAGS += -DXPG6
44 XGETFLAGS += -a -x expr.xcl
46 LDLIBS += -lgen
48 MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
49 LDFLAGS += $(MAPFILES:%=-M%)
51 .KEEP_STATE:
53 all: $(PROG) $(XPG4) $(XPG6)
55 install: all $(ROOTPROG) $(ROOTXPG4PROG) $(ROOTXPG6PROG)
57 $(PROG): exprobjs $(EXPROBJ) $(MAPFILES)
58 $(LINK.c) $(EXPROBJ) -o $@ $(LDLIBS)
59 $(POST_PROCESS)
61 $(XPG4): exprobjs.xpg4 $(XPG4EXPROBJ) $(MAPFILES)
62 $(LINK.c) $(XPG4EXPROBJ) -o $@ $(LDLIBS)
63 $(POST_PROCESS)
65 $(XPG6): exprobjs.xpg6 $(XPG6EXPROBJ) $(MAPFILES)
66 $(LINK.c) $(XPG6EXPROBJ) -o $@ $(LDLIBS)
67 $(POST_PROCESS)
69 exprobjs/%.o: %.c
70 $(COMPILE.c) -o $@ $<
72 exprobjs.xpg4/%.o: %.c
73 $(COMPILE.c) -o $@ $<
75 exprobjs.xpg6/%.o: %.c
76 $(COMPILE.c) -o $@ $<
78 exprobjs:
79 -@mkdir -p $@
81 exprobjs.xpg4:
82 -@mkdir -p $@
84 exprobjs.xpg6:
85 -@mkdir -p $@
87 clean:
88 $(RM) $(OBJS)
90 lint: lint_PROG
92 include ../Makefile.targ