10Sstevel@tonic-gate# 20Sstevel@tonic-gate# CDDL HEADER START 30Sstevel@tonic-gate# 40Sstevel@tonic-gate# The contents of this file are subject to the terms of the 54271Srie# Common Development and Distribution License (the "License"). 64271Srie# You may not use this file except in compliance with the License. 70Sstevel@tonic-gate# 80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate# See the License for the specific language governing permissions 110Sstevel@tonic-gate# and limitations under the License. 120Sstevel@tonic-gate# 130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate# 190Sstevel@tonic-gate# CDDL HEADER END 200Sstevel@tonic-gate# 210Sstevel@tonic-gate# 22*12836Srich.burridge@oracle.com# Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. 230Sstevel@tonic-gate# 240Sstevel@tonic-gate 250Sstevel@tonic-gatePROG= expr 260Sstevel@tonic-gateXPG4PROG= expr 270Sstevel@tonic-gateXPG6PROG= expr 280Sstevel@tonic-gate 290Sstevel@tonic-gateEXPROBJ= exprobjs/expr.o exprobjs/compile.o 300Sstevel@tonic-gateXPG4EXPROBJ= exprobjs.xpg4/expr.o exprobjs.xpg4/compile.o 310Sstevel@tonic-gateXPG6EXPROBJ= exprobjs.xpg6/expr.o exprobjs.xpg6/compile.o 320Sstevel@tonic-gate 330Sstevel@tonic-gateOBJS= $(EXPROBJ) $(XPG4EXPROBJ) $(XPG6EXPROBJ) 340Sstevel@tonic-gateSRCS= expr.c compile.c 350Sstevel@tonic-gate 360Sstevel@tonic-gateinclude ../Makefile.cmd 370Sstevel@tonic-gate 380Sstevel@tonic-gateCFLAGS += $(CCVERBOSE) 390Sstevel@tonic-gate$(XPG4) := CFLAGS += -DXPG4 400Sstevel@tonic-gate$(XPG6) := CFLAGS += -DXPG6 410Sstevel@tonic-gate 420Sstevel@tonic-gateXGETFLAGS += -a -x expr.xcl 430Sstevel@tonic-gate 440Sstevel@tonic-gateLDLIBS += -lgen 450Sstevel@tonic-gate 464271SrieMAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB) 474271SrieLDFLAGS += $(MAPFILES:%=-M%) 484271Srie 490Sstevel@tonic-gate.KEEP_STATE: 500Sstevel@tonic-gate 510Sstevel@tonic-gateall: $(PROG) $(XPG4) $(XPG6) 520Sstevel@tonic-gate 530Sstevel@tonic-gateinstall: all $(ROOTPROG) $(ROOTXPG4PROG) $(ROOTXPG6PROG) 540Sstevel@tonic-gate 554271Srie$(PROG): exprobjs $(EXPROBJ) $(MAPFILES) 560Sstevel@tonic-gate $(LINK.c) $(EXPROBJ) -o $@ $(LDLIBS) 570Sstevel@tonic-gate $(POST_PROCESS) 580Sstevel@tonic-gate 594271Srie$(XPG4): exprobjs.xpg4 $(XPG4EXPROBJ) $(MAPFILES) 600Sstevel@tonic-gate $(LINK.c) $(XPG4EXPROBJ) -o $@ $(LDLIBS) 610Sstevel@tonic-gate $(POST_PROCESS) 620Sstevel@tonic-gate 634271Srie$(XPG6): exprobjs.xpg6 $(XPG6EXPROBJ) $(MAPFILES) 640Sstevel@tonic-gate $(LINK.c) $(XPG6EXPROBJ) -o $@ $(LDLIBS) 650Sstevel@tonic-gate $(POST_PROCESS) 660Sstevel@tonic-gate 670Sstevel@tonic-gateexprobjs/%.o: %.c 680Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 690Sstevel@tonic-gate 700Sstevel@tonic-gateexprobjs.xpg4/%.o: %.c 710Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 720Sstevel@tonic-gate 730Sstevel@tonic-gateexprobjs.xpg6/%.o: %.c 740Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 750Sstevel@tonic-gate 760Sstevel@tonic-gateexprobjs: 770Sstevel@tonic-gate -@mkdir -p $@ 780Sstevel@tonic-gate 790Sstevel@tonic-gateexprobjs.xpg4: 800Sstevel@tonic-gate -@mkdir -p $@ 810Sstevel@tonic-gate 820Sstevel@tonic-gateexprobjs.xpg6: 830Sstevel@tonic-gate -@mkdir -p $@ 840Sstevel@tonic-gate 850Sstevel@tonic-gateclean: 860Sstevel@tonic-gate $(RM) $(OBJS) 870Sstevel@tonic-gate 880Sstevel@tonic-gatelint: lint_PROG 890Sstevel@tonic-gate 900Sstevel@tonic-gateinclude ../Makefile.targ 91