Cross Reference: /illumos-gate/usr/src/cmd/vi/port/Makefile
Makefile revision 7c478bd95313f5f23a4c958a745db2134aa03244
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License"). You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
#
# cmd/vi/port/Makefile
PROG= ex
XPG4PROG= ex
XPG6PROG= ex
LIBPROGS= expreserve exrecover
XD4= exobjs.xpg4
XD6= exobjs.xpg6
EXOBJS= bcopy.o ex.o ex_addr.o ex_cmds.o ex_cmds2.o \
ex_cmdsub.o ex_data.o ex_extern.o ex_get.o \
ex_io.o ex_put.o ex_re.o ex_set.o ex_subr.o \
ex_temp.o ex_tty.o ex_unix.o ex_v.o ex_vadj.o \
ex_vget.o ex_vmain.o ex_voper.o ex_vops.o \
ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o \
printf.o
EXOBJS_XPG4= $(EXOBJS) compile.o values-xpg4.o
EXOBJS_XPG6= $(EXOBJS) compile.o values-xpg6.o
XPG4EXOBJS= ${EXOBJS_XPG4:%=$(XD4)/%}
XPG6EXOBJS= ${EXOBJS_XPG6:%=$(XD6)/%}
EXRECOVEROBJS= exrecover.o ex_extern.o
OBJS= $(EXOBJS) $(XPG4EXOBJS) $(XPG6EXOBJS) expreserve.o exrecover.o
SRCS= $(EXOBJS:%.o=%.c) expreserve.c exrecover.c
TXTS = READ_ME makeoptions asfix.c70 ex.news port.mk.370 port.mk.70 \
port.mk.c70 port.mk.usg ovdoprnt.s ovprintf.c rofix
include ../../Makefile.cmd
#
# For message catalogue files
#
POFILES= $(EXOBJS:%.o=%.po) expreserve.po exrecover.po
POFILE= port.po
# Include all XPG4 and XPG4ONLY changes in the XPG4 version
$(XPG4) := CFLAGS += -DXPG4 -DXPG4ONLY
# Include all XPG4 changes, but don't include XPG4ONLY in the XPG6 version
$(XPG6) := CFLAGS += -DXPG4 -I$(SRC)/lib/libc/inc
CPPFLAGS += -DUSG -DSTDIO -DVMUNIX -DTABS=8 -DSINGLE -DTAG_STACK
CLOBBERFILES += $(LIBPROGS)
ex := LDLIBS += -lmapmalloc -lcurses \
$(ZLAZYLOAD) -lgen -lcrypt_i $(ZNOLAZYLOAD)
$(XPG4) := LDLIBS += -lmapmalloc -lcurses \
$(ZLAZYLOAD) -lgen -lcrypt_i $(ZNOLAZYLOAD)
$(XPG6) := LDLIBS += -lmapmalloc -lcurses \
$(ZLAZYLOAD) -lgen -lcrypt_i $(ZNOLAZYLOAD)
exrecover := LDLIBS += -lmapmalloc -lcrypt_i
lint := LDLIBS += -lmapmalloc -lcurses -lgen -lcrypt
ROOTLIBPROGS= $(LIBPROGS:%=$(ROOTLIB)/%)
# hard links to ex
ROOTLINKS= $(ROOTBIN)/vi $(ROOTBIN)/view $(ROOTBIN)/edit $(ROOTBIN)/vedit
ROOTXPG4LINKS= $(ROOTXPG4BIN)/vi $(ROOTXPG4BIN)/view $(ROOTXPG4BIN)/edit \
$(ROOTXPG4BIN)/vedit
ROOTXPG6LINKS= $(ROOTXPG6BIN)/vi $(ROOTXPG6BIN)/view $(ROOTXPG6BIN)/edit \
$(ROOTXPG6BIN)/vedit
.KEEP_STATE:
.PARALLEL: $(OBJS)
all: $(PROG) $(XPG4) $(XPG6) $(LIBPROGS)
$(PROG): $(EXOBJS)
$(LINK.c) $(EXOBJS) -o $@ $(LDLIBS)
$(POST_PROCESS)
ex.xpg4: $(XD4) $(XPG4EXOBJS)
$(LINK.c) $(XPG4EXOBJS) -o $@ $(LDLIBS)
$(POST_PROCESS)
ex.xpg6: $(XD6) $(XPG6EXOBJS)
$(LINK.c) $(XPG6EXOBJS) -o $@ $(LDLIBS)
$(POST_PROCESS)
$(XD4)/compile.o $(XD6)/compile.o: ../../expr/compile.c
$(COMPILE.c) -o $@ ../../expr/compile.c
%values-xpg4.o: ../../../lib/common/common/values-xpg4.c
$(COMPILE.c) -o $@ ../../../lib/common/common/values-xpg4.c
%values-xpg6.o: ../../../lib/common/common/values-xpg6.c
$(COMPILE.c) -o $@ ../../../lib/common/common/values-xpg6.c
$(XPG4EXOBJS): $(XD4)
$(XPG6EXOBJS): $(XD6)
$(XD4)/%.o: %.c
$(COMPILE.c) -o $@ $<
$(XD6)/%.o: %.c
$(COMPILE.c) -o $@ $<
$(XD4):
-@mkdir -p $@
$(XD6):
-@mkdir -p $@
exrecover: $(EXRECOVEROBJS)
$(LINK.c) $(EXRECOVEROBJS) -o $@ $(LDLIBS)
$(POST_PROCESS)
catalog: $(MSGDOMAIN) $(POFILE)
$(POFILE): $(POFILES)
$(RM) $@
cat $(POFILES) > $@
install: all $(ROOTPROG) $(ROOTLIBPROGS) $(ROOTLINKS) \
$(ROOTXPG4PROG) $(ROOTXPG4LINKS) $(ROOTXPG6PROG) $(ROOTXPG6LINKS)
$(ROOTLINKS): $(ROOTPROG)
-$(RM) $@
-$(LN) -f $(ROOTPROG) $@
$(ROOTXPG4LINKS): $(ROOTXPG4PROG)
-$(RM) $@
-$(LN) -f $(ROOTXPG4PROG) $@
$(ROOTXPG6LINKS): $(ROOTXPG6PROG)
-$(RM) $@
-$(LN) -f $(ROOTXPG6PROG) $@
clean:
$(RM) $(OBJS)
lint: lint_SRCS
include ../../Makefile.targ