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 2005 Sun Microsystems, Inc. All rights reserved. 26 # Use is subject to license terms. 27 # 28 # cmd/awk/Makefile 29 # 30 31 # NOTE: awk is oawk. 32 33 PROG= nawk 34 35 OBJ1= b.o lib.o main.o parse.o proctab.o run.o tran.o 36 OBJ2= awk.g.o awk.lx.o 37 OBJS= $(OBJ2) $(OBJ1) 38 SRCS= $(OBJ1:%.o=%.c) 39 40 include ../Makefile.cmd 41 # 42 # Message catalog 43 # 44 POFILES= $(OBJS:%.o=%.po) 45 POFILE= awk.po 46 XGETFLAGS += -a -x awk.xcl 47 # 48 49 CPPFLAGS += -D_FILE_OFFSET_BITS=64 50 YFLAGS += -d 51 LDLIBS += -lm 52 LINTFLAGS += -u 53 CLEANFILES= maketab proctab.c awk.g.c awk.lx.c y.tab.h 54 55 .KEEP_STATE: 56 57 all: $(PROG) 58 59 $(PROG): $(OBJS) 60 $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 61 $(POST_PROCESS) 62 63 # 64 # message catalog 65 # 66 67 $(POFILE): y.tab.h $(POFILES) 68 $(RM) $@ 69 cat $(POFILES) > $@ 70 # 71 72 proctab.c: maketab 73 rm -f $@; ./maketab > $@ 74 75 maketab: maketab.c 76 $(NATIVECC) -O maketab.c -o $@ $(LDLIBS) 77 78 install: all $(ROOTPROG) $(ROOTLINK) 79 80 clean: 81 $(RM) $(OBJS) $(CLEANFILES) 82 83 lint: awk.g.c lint_SRCS 84 85 awk.g.c + y.tab.h: awk.g.y 86 87 awk.g.o: awk.g.c 88 89 awk.lx.c: awk.lx.l 90 91 proctab.o: proctab.c 92 $(COMPILE.c) proctab.c 93 $(POST_PROCESS_O) 94 95 include ../Makefile.targ 96