8354 sync regcomp(3C) with upstream (fix make catalog)
[unleashed/tickless.git] / usr / src / cmd / vi / port / port.mk.usg
blob30ee4c3b02b31fdf669f44da245f09e3fc9833c2
2 # Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3 # Use is subject to license terms.
5 # CDDL HEADER START
7 # The contents of this file are subject to the terms of the
8 # Common Development and Distribution License, Version 1.0 only
9 # (the "License").  You may not use this file except in compliance
10 # with the License.
12 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13 # or http://www.opensolaris.org/os/licensing.
14 # See the License for the specific language governing permissions
15 # and limitations under the License.
17 # When distributing Covered Code, include this CDDL HEADER in each
18 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19 # If applicable, add the following below this CDDL HEADER, with the
20 # fields enclosed by brackets "[]" replaced with your own identifying
21 # information: Portions Copyright [yyyy] [name of copyright owner]
23 # CDDL HEADER END
26 #ident  "%Z%%M% %I%     %E% SMI"
28 #       Makefile for vi
30 ROOT =
32 DIR = $(ROOT)/usr/bin
33 DIRS = $(ROOT)/var/preserve
35 LIBDIR  = $(ROOT)/usr/lib
36 EX      = ex
38 INC = $(ROOT)/usr/include
40 LDFLAGS = -s -lcurses -lcrypt_i -lgen -lw $(PERFLIBS)
42 OPTIONS = -DUSG -DSTDIO 
44 DEBUGFLAGS = -DTRACE -g
45 NONDEBUGFLAGS = -O
46 DEB = $(NONDEBUGFLAGS)
48 CFLAGS = $(DEB) -I$(INC) $(OPTIONS) -DTABS=8 -DSINGLE
50 INS = install
52 STRIP = strip
54 SIZE = size
56 FOLD = ../misc/fold
57 CTAGS = ../misc/ctags
58 CXREF = ../misc/cxref
61 MAKEFILE = makefile.usg
64 MAINS = ex expreserve exrecover 
66 OBJECTS =  bcopy.o ex.o ex_addr.o ex_cmds.o ex_cmds2.o \
67         ex_cmdsub.o ex_data.o ex_extern.o ex_get.o \
68         ex_io.o ex_put.o ex_re.o ex_set.o ex_subr.o \
69         ex_temp.o ex_tty.o ex_unix.o ex_v.o ex_vadj.o \
70         ex_vget.o ex_vmain.o ex_voper.o ex_vops.o \
71         ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o \
72         printf.o expreserve.o exrecover.o
74 SOURCES =  bcopy.c ex.c ex_addr.c ex_cmds.c ex_cmds2.c \
75         ex_cmdsub.c ex_data.c ex_extern.c ex_get.c \
76         ex_io.c ex_put.c ex_re.c ex_set.c ex_subr.c \
77         ex_temp.c ex_tty.c ex_unix.c ex_v.c ex_vadj.c \
78         ex_vget.c ex_vmain.c ex_voper.c ex_vops.c \
79         ex_vops2.c ex_vops3.c ex_vput.c ex_vwind.c \
80         printf.c exrecover.c expreserve.c
82 MISC = READ_ME makeoptions asfix.c70 ex.news makefile.370 makefile.c70 \
83         makefile.70 ovdoprnt.s ovprintf.c rofix
85 ALL:            $(MAINS)
87 ex:             bcopy.o ex.o ex_addr.o ex_cmds.o ex_cmds2.o \
88                 ex_cmdsub.o ex_data.o ex_extern.o ex_get.o \
89                 ex_io.o ex_put.o ex_re.o ex_set.o ex_subr.o \
90                 ex_temp.o ex_tty.o ex_unix.o ex_v.o ex_vadj.o \
91                 ex_vget.o ex_vmain.o ex_voper.o ex_vops.o \
92                 ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o \
93                 printf.o 
94         $(CC) $(CFLAGS)  -o ex  bcopy.o ex.o ex_addr.o ex_cmds.o ex_cmds2.o \
95         ex_cmdsub.o ex_data.o ex_extern.o ex_get.o \
96         ex_io.o ex_put.o ex_re.o ex_set.o ex_subr.o \
97         ex_temp.o ex_tty.o ex_unix.o ex_v.o ex_vadj.o \
98         ex_vget.o ex_vmain.o ex_voper.o ex_vops.o \
99         ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o \
100         printf.o $(LDFLAGS)
102 expreserve:     expreserve.o 
103         $(CC) -s expreserve.o  -o expreserve 
105 exrecover:      exrecover.o 
106         $(CC) $(CFLAGS) -s  -o exrecover  exrecover.o ex_extern.o $(LDFLAGS)
109 ex.o:            ex.h $(INC)/sys/types.h $(INC)/ctype.h \
110                  $(INC)/errno.h $(INC)/signal.h $(INC)/setjmp.h \
111                  $(INC)/sys/stat.h $(INC)/termio.h $(INC)/sys/termio.h \
112                  $(INC)/term.h ex_tune.h ex_vars.h \
113                  ex_argv.h ex_temp.h ex_tty.h 
115 ex_addr.o:       ex.h $(INC)/sys/types.h $(INC)/ctype.h \
116                  $(INC)/errno.h $(INC)/signal.h \
117                  $(INC)/setjmp.h $(INC)/sys/stat.h \
118                  $(INC)/termio.h $(INC)/sys/termio.h \
119                  $(INC)/term.h ex_tune.h ex_vars.h \
120                  ex_re.h 
122 ex_cmds.o:       ex.h $(INC)/sys/types.h $(INC)/ctype.h \
123                  $(INC)/errno.h $(INC)/signal.h \
124                  $(INC)/setjmp.h $(INC)/sys/stat.h \
125                  $(INC)/termio.h $(INC)/sys/termio.h \
126                  $(INC)/term.h ex_tune.h ex_vars.h \
127                  ex_argv.h ex_temp.h ex_tty.h ex_vis.h 
129 ex_cmds2.o:      ex.h $(INC)/sys/types.h $(INC)/ctype.h \
130                  $(INC)/errno.h $(INC)/signal.h \
131                  $(INC)/setjmp.h $(INC)/sys/stat.h \
132                  $(INC)/termio.h $(INC)/sys/termio.h \
133                  $(INC)/term.h ex_tune.h ex_vars.h \
134                  ex_argv.h ex_temp.h ex_tty.h ex_vis.h 
136 ex_cmdsub.o:     ex.h $(INC)/sys/types.h $(INC)/ctype.h \
137                  $(INC)/errno.h $(INC)/signal.h \
138                  $(INC)/setjmp.h $(INC)/sys/stat.h \
139                  $(INC)/termio.h $(INC)/sys/termio.h \
140                  $(INC)/term.h ex_tune.h ex_vars.h \
141                  ex_argv.h ex_temp.h ex_tty.h ex_vis.h $(INC)/stdio.h 
143 ex_data.o:       ex.h $(INC)/sys/types.h $(INC)/ctype.h \
144                  $(INC)/errno.h $(INC)/signal.h \
145                  $(INC)/setjmp.h $(INC)/sys/stat.h \
146                  $(INC)/termio.h $(INC)/sys/termio.h \
147                  $(INC)/term.h ex_tune.h \
148                  ex_vars.h ex_tty.h 
150 ex_extern.o:     ex.h $(INC)/sys/types.h $(INC)/ctype.h \
151                  $(INC)/errno.h $(INC)/signal.h \
152                  $(INC)/setjmp.h $(INC)/sys/stat.h \
153                  $(INC)/termio.h $(INC)/sys/termio.h \
154                  $(INC)/term.h ex_tune.h ex_vars.h \
155                  ex_argv.h ex_re.h ex_temp.h ex_tty.h ex_vis.h 
157 ex_get.o:        ex.h $(INC)/sys/types.h $(INC)/ctype.h \
158                  $(INC)/errno.h $(INC)/signal.h \
159                  $(INC)/setjmp.h $(INC)/sys/stat.h \
160                  $(INC)/termio.h $(INC)/sys/termio.h \
161                  $(INC)/term.h ex_tune.h \
162                  ex_vars.h ex_tty.h 
164 ex_io.o:         ex.h $(INC)/sys/types.h $(INC)/ctype.h \
165                  $(INC)/errno.h $(INC)/signal.h \
166                  $(INC)/setjmp.h $(INC)/sys/stat.h \
167                  $(INC)/termio.h $(INC)/sys/termio.h \
168                  $(INC)/term.h ex_tune.h ex_vars.h \
169                  ex_argv.h ex_temp.h ex_tty.h ex_vis.h 
171 ex_put.o:        ex.h $(INC)/sys/types.h $(INC)/ctype.h \
172                  $(INC)/errno.h $(INC)/signal.h \
173                  $(INC)/setjmp.h $(INC)/sys/stat.h \
174                  $(INC)/termio.h $(INC)/sys/termio.h \
175                  $(INC)/term.h ex_tune.h \
176                  ex_vars.h ex_tty.h ex_vis.h 
178 ex_re.o:         ex.h $(INC)/sys/types.h $(INC)/ctype.h \
179                  $(INC)/errno.h $(INC)/signal.h \
180                  $(INC)/setjmp.h $(INC)/sys/stat.h \
181                  $(INC)/termio.h $(INC)/sys/termio.h \
182                  $(INC)/term.h ex_tune.h \
183                  ex_vars.h ex_re.h 
185 ex_set.o:        ex.h $(INC)/sys/types.h $(INC)/ctype.h \
186                  $(INC)/errno.h $(INC)/signal.h \
187                  $(INC)/setjmp.h $(INC)/sys/stat.h \
188                  $(INC)/termio.h $(INC)/sys/termio.h \
189                  $(INC)/term.h ex_tune.h \
190                  ex_vars.h ex_temp.h ex_tty.h 
192 ex_subr.o:       ex.h $(INC)/sys/types.h $(INC)/ctype.h \
193                  $(INC)/errno.h $(INC)/signal.h \
194                  $(INC)/setjmp.h $(INC)/sys/stat.h \
195                  $(INC)/termio.h $(INC)/sys/termio.h \
196                  $(INC)/term.h ex_tune.h \
197                  ex_vars.h ex_re.h ex_tty.h ex_vis.h 
199 ex_temp.o:       ex.h $(INC)/sys/types.h $(INC)/ctype.h \
200                  $(INC)/errno.h $(INC)/signal.h \
201                  $(INC)/setjmp.h $(INC)/sys/stat.h \
202                  $(INC)/termio.h $(INC)/sys/termio.h \
203                  $(INC)/term.h ex_tune.h \
204                  ex_vars.h ex_temp.h ex_vis.h ex_tty.h 
206 ex_tty.o:        ex.h $(INC)/sys/types.h $(INC)/ctype.h \
207                  $(INC)/errno.h $(INC)/signal.h \
208                  $(INC)/setjmp.h $(INC)/sys/stat.h \
209                  $(INC)/termio.h $(INC)/sys/termio.h \
210                  $(INC)/term.h ex_tune.h \
211                  ex_vars.h ex_tty.h 
213 ex_unix.o:       ex.h $(INC)/sys/types.h $(INC)/ctype.h \
214                  $(INC)/errno.h $(INC)/signal.h \
215                  $(INC)/setjmp.h $(INC)/sys/stat.h \
216                  $(INC)/termio.h $(INC)/sys/termio.h \
217                  $(INC)/term.h ex_tune.h \
218                  ex_vars.h ex_temp.h ex_tty.h ex_vis.h 
220 ex_v.o:          ex.h $(INC)/sys/types.h $(INC)/ctype.h \
221                  $(INC)/errno.h $(INC)/signal.h \
222                  $(INC)/setjmp.h $(INC)/sys/stat.h \
223                  $(INC)/termio.h $(INC)/sys/termio.h \
224                  $(INC)/term.h ex_tune.h \
225                  ex_vars.h ex_re.h ex_tty.h ex_vis.h 
227 ex_vadj.o:       ex.h $(INC)/sys/types.h $(INC)/ctype.h \
228                  $(INC)/errno.h $(INC)/signal.h \
229                  $(INC)/setjmp.h $(INC)/sys/stat.h \
230                  $(INC)/termio.h $(INC)/sys/termio.h \
231                  $(INC)/term.h ex_tune.h \
232                  ex_vars.h ex_tty.h ex_vis.h 
234 ex_vget.o:       ex.h $(INC)/sys/types.h $(INC)/ctype.h \
235                  $(INC)/errno.h $(INC)/signal.h \
236                  $(INC)/setjmp.h $(INC)/sys/stat.h \
237                  $(INC)/termio.h $(INC)/sys/termio.h \
238                  $(INC)/term.h ex_tune.h \
239                  ex_vars.h ex_tty.h ex_vis.h 
241 ex_vmain.o:      ex.h $(INC)/sys/types.h $(INC)/ctype.h \
242                  $(INC)/errno.h $(INC)/signal.h \
243                  $(INC)/setjmp.h $(INC)/sys/stat.h \
244                  $(INC)/termio.h $(INC)/sys/termio.h \
245                  $(INC)/term.h ex_tune.h \
246                  ex_vars.h ex_tty.h ex_vis.h 
248 ex_voper.o:      ex.h $(INC)/sys/types.h $(INC)/ctype.h \
249                  $(INC)/errno.h $(INC)/signal.h \
250                  $(INC)/setjmp.h $(INC)/sys/stat.h \
251                  $(INC)/termio.h $(INC)/sys/termio.h \
252                  $(INC)/term.h ex_tune.h \
253                  ex_vars.h ex_tty.h ex_vis.h 
255 ex_vops.o:       ex.h $(INC)/sys/types.h $(INC)/ctype.h \
256                  $(INC)/errno.h $(INC)/signal.h \
257                  $(INC)/setjmp.h $(INC)/sys/stat.h \
258                  $(INC)/termio.h $(INC)/sys/termio.h \
259                  $(INC)/term.h ex_tune.h \
260                  ex_vars.h ex_tty.h ex_vis.h 
262 ex_vops2.o:      ex.h $(INC)/sys/types.h $(INC)/ctype.h \
263                  $(INC)/errno.h $(INC)/signal.h \
264                  $(INC)/setjmp.h $(INC)/sys/stat.h \
265                  $(INC)/termio.h $(INC)/sys/termio.h \
266                  $(INC)/term.h ex_tune.h \
267                  ex_vars.h ex_tty.h ex_vis.h 
269 ex_vops3.o:      ex.h $(INC)/sys/types.h $(INC)/ctype.h \
270                  $(INC)/errno.h $(INC)/signal.h \
271                  $(INC)/setjmp.h $(INC)/sys/stat.h \
272                  $(INC)/termio.h $(INC)/sys/termio.h \
273                  $(INC)/term.h ex_tune.h \
274                  ex_vars.h ex_tty.h ex_vis.h 
276 ex_vput.o:       ex.h $(INC)/sys/types.h $(INC)/ctype.h \
277                  $(INC)/errno.h $(INC)/signal.h \
278                  $(INC)/setjmp.h $(INC)/sys/stat.h \
279                  $(INC)/termio.h $(INC)/sys/termio.h \
280                  $(INC)/term.h ex_tune.h \
281                  ex_vars.h ex_tty.h ex_vis.h 
283 ex_vwind.o:      ex.h $(INC)/sys/types.h $(INC)/ctype.h \
284                  $(INC)/errno.h $(INC)/signal.h \
285                  $(INC)/setjmp.h $(INC)/sys/stat.h \
286                  $(INC)/termio.h $(INC)/sys/termio.h \
287                  $(INC)/term.h ex_tune.h \
288                  ex_vars.h ex_tty.h ex_vis.h 
290 expreserve.o:    $(INC)/stdio.h $(INC)/ctype.h \
291                  $(INC)/sys/types.h $(INC)/sys/stat.h \
292                  $(INC)/sys/dir.h $(INC)/pwd.h 
293         $(CC) $(CFLAGS) -c -O expreserve.c
295 exrecover.o:     $(INC)/stdio.h ex.h $(INC)/sys/types.h \
296                  $(INC)/ctype.h $(INC)/errno.h \
297                  $(INC)/signal.h $(INC)/setjmp.h \
298                  $(INC)/sys/stat.h $(INC)/termio.h \
299                  $(INC)/sys/termio.h $(INC)/term.h ex_tune.h \
300                  ex_vars.h ex_temp.h ex_tty.h \
301                  $(INC)/sys/dir.h 
302         $(CC) $(CFLAGS) -c -O exrecover.c
304 printf.o:        $(INC)/varargs.h       
306 GLOBALINCS = $(INC)/ctype.h $(INC)/errno.h \
307         $(INC)/pwd.h $(INC)/setjmp.h $(INC)/signal.h \
308         $(INC)/stdio.h $(INC)/sys/dir.h $(INC)/sys/stat.h \
309         $(INC)/sys/termio.h $(INC)/sys/types.h \
310         $(INC)/term.h $(INC)/termio.h $(INC)/varargs.h 
312 LOCALINCS = ex.h ex_argv.h ex_re.h ex_temp.h ex_tty.h ex_tune.h ex_vars.h \
313         ex_vis.h
315 clean:
316         rm -f $(OBJECTS)
318 clobber:
319         rm -f $(OBJECTS) $(MAINS)
321 all : ALL
323 install: ALL $(DIRS)
324         rm -f $(DIR)/vi ; \
325         rm -f $(DIR)/view ; \
326         rm -f $(DIR)/edit ; \
327         rm -f $(DIR)/vedit ; \
328         $(INS) -f $(DIR) -m 555 -u bin -g bin -o $(EX);
329         ln -f $(DIR)/$(EX) $(DIR)/vi
330         ln -f $(DIR)/$(EX) $(DIR)/view
331         ln -f $(DIR)/$(EX) $(DIR)/edit
332         ln -f $(DIR)/$(EX) $(DIR)/vedit
333         $(INS) -f $(LIBDIR) -m 555 -u bin -g bin exrecover
334         $(INS) -f $(LIBDIR) -m 555 -u bin -g bin expreserve
336 $(DIRS):
337         mkdir $@
339 size: ALL
340         $(SIZE) $(MAINS)
342 strip: ALL
343         $(STRIP) $(MAINS)
345 #       These targets are useful but optional
347 partslist:
348         @echo $(MAKEFILE) $(SOURCES) $(LOCALINCS)  |  tr ' ' '\012'  |  sort
350 productdir:
351         @echo $(DIR) | tr ' ' '\012' | sort
353 product:
354         @echo $(MAINS)  |  tr ' ' '\012'  | \
355         sed 's;^;$(DIR)/;'
357 srcaudit:
358         @fileaudit $(MAKEFILE) $(LOCALINCS) $(SOURCES) $(MISC) -o $(OBJECTS) $(MAINS)