1# 2# CDDL HEADER START 3# 4# The contents of this file are subject to the terms of the 5# Common Development and Distribution License, Version 1.0 only 6# (the "License"). You may not use this file except in compliance 7# with the License. 8# 9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10# or http://www.opensolaris.org/os/licensing. 11# See the License for the specific language governing permissions 12# and limitations under the License. 13# 14# When distributing Covered Code, include this CDDL HEADER in each 15# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16# If applicable, add the following below this CDDL HEADER, with the 17# fields enclosed by brackets "[]" replaced with your own identifying 18# information: Portions Copyright [yyyy] [name of copyright owner] 19# 20# CDDL HEADER END 21# 22# 23#ident "%Z%%M% %I% %E% SMI" 24# 25# Copyright (c) 1989,1996,2001 by Sun Microsystems, Inc. 26# All rights reserved. 27# 28# cmd/awk/Makefile 29# 30 31# NOTE: awk is oawk. 32 33PROG= nawk 34 35OBJ1= b.o lib.o main.o parse.o proctab.o run.o tran.o 36OBJ2= awk.g.o awk.lx.o 37OBJS= $(OBJ2) $(OBJ1) 38SRCS= $(OBJ1:%.o=%.c) 39 40include ../Makefile.cmd 41# 42# Message catalog 43# 44POFILES= $(OBJS:%.o=%.po) 45POFILE= awk.po 46XGETFLAGS += -a -x awk.xcl 47# 48 49CPPFLAGS += -D_FILE_OFFSET_BITS=64 50YFLAGS += -d 51LDLIBS += -lm 52CLEANFILES= maketab proctab.c awk.g.c awk.lx.c y.tab.h 53 54.KEEP_STATE: 55 56all: $(PROG) 57 58$(PROG): $(OBJS) 59 $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 60 $(POST_PROCESS) 61 62# 63# message catalog 64# 65 66$(POFILE): y.tab.h $(POFILES) 67 $(RM) $@ 68 cat $(POFILES) > $@ 69# 70 71proctab.c: maketab 72 rm -f $@; ./maketab > $@ 73 74maketab: maketab.c 75 $(NATIVECC) -O maketab.c -o $@ $(LDLIBS) 76 77install: all $(ROOTPROG) $(ROOTLINK) 78 79clean: 80 $(RM) $(OBJS) $(CLEANFILES) 81 82lint: lint_SRCS 83 84awk.g.c + y.tab.h: awk.g.y 85 86awk.g.o: awk.g.c 87 88awk.lx.c: awk.lx.l 89 90proctab.o: proctab.c 91 $(COMPILE.c) proctab.c 92 $(POST_PROCESS_O) 93 94include ../Makefile.targ 95