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]
22 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
31 XPG4EDOBJ
= edobjs.xpg4
/ed.o edobjs.xpg4
/compile.o values-xpg4.o
32 XPG6EDOBJ
= edobjs.xpg6
/ed.o edobjs.xpg6
/compile.o values-xpg6.o
33 OBJS
= $(EDOBJ
) $(XPG4EDOBJ
) $(XPG6EDOBJ
)
34 SRCS
= .
/ed.c ..
/expr
/compile.c
36 POFILES
= $(EDOBJ
:%.o
=%.po
)
38 include ..
/Makefile.cmd
40 CFLAGS
+= $(CCVERBOSE
)
41 CERRWARN
+= -_gcc
=-Wno-parentheses
42 CERRWARN
+= -_gcc
=-Wno-unused-variable
43 CERRWARN
+= -_gcc
=-Wno-unused-function
44 CERRWARN
+= -_gcc
=-Wno-uninitialized
45 $(XPG4
) := CFLAGS
+= -DXPG4
46 $(XPG6
) := CFLAGS
+= -DXPG6
-I
$(SRC
)/lib
/libc
/inc
47 lint
:= LDLIBS
+= -lgen
-lcrypt
48 LDLIBS
+= -lmapmalloc
-lgen
-lcrypt_i
49 XGETFLAGS
+= -a
-x ed.xcl
51 MAPFILE.INT
= ..
/expr
/mapfile-intf
52 LDFLAGS
+= $(MAPFILE.INT
:%=-M
%)
57 $(COMPILE.
cpp) $< > $*.c.i
58 $(XGETTEXT
) $(XGETFLAGS
) $*.c.i
63 all: $(PROG
) $(XPG4
) $(XPG6
)
65 $(PROG
): $(EDOBJ
) $(MAPFILE.INT
)
66 $(LINK.c
) $(EDOBJ
) -o
$@
$(LDLIBS
)
69 $(XPG4
): edobjs.xpg4
$(XPG4EDOBJ
) $(MAPFILE.INT
)
70 $(LINK.c
) $(XPG4EDOBJ
) -o
$@
$(LDLIBS
)
73 $(XPG6
): edobjs.xpg6
$(XPG6EDOBJ
) $(MAPFILE.INT
)
74 $(LINK.c
) $(XPG6EDOBJ
) -o
$@
$(LDLIBS
)
77 compile.o
: ..
/expr
/compile.c
78 $(COMPILE.c
) -o
$@ ..
/expr
/compile.c
83 edobjs.xpg4
/%.o
: ..
/expr
/compile.c
89 edobjs.xpg6
/%.o
: ..
/expr
/compile.c
102 install: all $(ROOTPROG
) $(ROOTXPG4PROG
) $(ROOTXPG6PROG
)
104 $(LN
) $(ROOTBIN
)/ed
$(ROOTBIN
)/red
106 values-xpg4.o
: ..
/..
/lib
/common
/common
/values-xpg4.c
107 $(COMPILE.c
) -o
$@ ..
/..
/lib
/common
/common
/values-xpg4.c
109 values-xpg6.o
: ..
/..
/lib
/common
/common
/values-xpg6.c
110 $(COMPILE.c
) -o
$@ ..
/..
/lib
/common
/common
/values-xpg6.c
113 -@
rm -rf
$(OBJS
) $(XPG4
) $(XPG6
) edobjs.xpg4 edobjs.xpg6 \
118 include ..
/Makefile.targ