#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# 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
# 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
#
#ident "%Z%%M% %I% %E% SMI"
# Makefile for vi
ROOT =
DIR = $(ROOT)/usr/bin
DIRS = $(ROOT)/var/preserve
LIBDIR = $(ROOT)/usr/lib
EX = ex
INC = $(ROOT)/usr/include
LDFLAGS = -s -lcurses -lcrypt_i -lgen -lw $(PERFLIBS)
OPTIONS = -DUSG -DSTDIO
DEBUGFLAGS = -DTRACE -g
NONDEBUGFLAGS = -O
DEB = $(NONDEBUGFLAGS)
CFLAGS = $(DEB) -I$(INC) $(OPTIONS) -DTABS=8 -DSINGLE
INS = install
STRIP = strip
SIZE = size
FOLD = ../misc/fold
CTAGS = ../misc/ctags
CXREF = ../misc/cxref
MAKEFILE = makefile.usg
MAINS = ex expreserve exrecover
makefile.70 ovdoprnt.s ovprintf.c rofix
ALL: $(MAINS)
printf.o $(LDFLAGS)
expreserve: expreserve.o
$(CC) -s expreserve.o -o expreserve
exrecover: exrecover.o
$(CC) $(CFLAGS) -s -o exrecover exrecover.o ex_extern.o $(LDFLAGS)
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/setjmp.h $(INC)/sys/stat.h \
$(INC)/termio.h $(INC)/sys/termio.h \
$(INC)/sys/types.h $(INC)/sys/stat.h \
$(INC)/sys/dir.h $(INC)/pwd.h
$(CC) $(CFLAGS) -c -O expreserve.c
$(INC)/sys/stat.h $(INC)/termio.h \
$(INC)/sys/dir.h
$(CC) $(CFLAGS) -c -O exrecover.c
$(INC)/sys/termio.h $(INC)/sys/types.h \
clean:
rm -f $(OBJECTS)
clobber:
rm -f $(OBJECTS) $(MAINS)
all : ALL
install: ALL $(DIRS)
rm -f $(DIR)/vi ; \
rm -f $(DIR)/view ; \
rm -f $(DIR)/edit ; \
rm -f $(DIR)/vedit ; \
$(INS) -f $(DIR) -m 555 -u bin -g bin -o $(EX);
ln -f $(DIR)/$(EX) $(DIR)/vi
ln -f $(DIR)/$(EX) $(DIR)/view
ln -f $(DIR)/$(EX) $(DIR)/edit
ln -f $(DIR)/$(EX) $(DIR)/vedit
$(INS) -f $(LIBDIR) -m 555 -u bin -g bin exrecover
$(INS) -f $(LIBDIR) -m 555 -u bin -g bin expreserve
$(DIRS):
mkdir $@
size: ALL
$(SIZE) $(MAINS)
strip: ALL
$(STRIP) $(MAINS)
# These targets are useful but optional
partslist:
@echo $(MAKEFILE) $(SOURCES) $(LOCALINCS) | tr ' ' '\012' | sort
productdir:
@echo $(DIR) | tr ' ' '\012' | sort
product:
@echo $(MAINS) | tr ' ' '\012' | \
sed 's;^;$(DIR)/;'
srcaudit:
@fileaudit $(MAKEFILE) $(LOCALINCS) $(SOURCES) $(MISC) -o $(OBJECTS) $(MAINS)