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# Copyright (c) 1989 by Sun Microsystems, Inc. 24# 25# Copyright (c) 2019, Joyent, Inc. 26 27include ../../Makefile.cmd 28 29SUBDIRS = terms.d 30 31PROG = nroff 32 33OBJS = n10.o n6.o 34 35COMMONOBJS = hytab.o n1.o n2.o n3.o n4.o n5.o \ 36 n7.o n8.o n9.o ni.o nii.o suftab.o 37 38SRCS = $(OBJS:%.o=%.c) $(COMMONOBJS:%.o=../%.c) 39 40 41CPPFLAGS = -DNROFF -DUSG -DINCORE -DEUC -I. -I.. $(CPPFLAGS.master) 42 43CERRWARN += -_gcc=-Wno-unused-value 44CERRWARN += -_gcc=-Wno-extra 45CERRWARN += -_gcc=-Wno-implicit-function-declaration 46CERRWARN += -_gcc=-Wno-parentheses 47CERRWARN += -_gcc=-Wno-unused-variable 48 49# parse error: parsing (i (9223372034707292160-96) >= 65) 50SMATCH = off 51 52LDLIBS += -lmapmalloc 53# 54# message catalog 55# 56POFILES= $(OBJS:%.o=%.po) 57POFILE= nroff.d.po 58 59 60all := TARGET= all 61install := TARGET= install 62clean := TARGET= clean 63clobber := TARGET= clobber 64lint := TARGET= lint 65strip := TARGET= strip 66 67# build rule for common source above 68%.o: ../%.c 69 $(COMPILE.c) $< 70 71.KEEP_STATE: 72 73.PARALLEL: $(COMMONOBJS) $(OBJS) 74 75all : $(PROG) $(SUBDIRS) 76 77$(PROG) : $(OBJS) $(COMMONOBJS) 78 $(LINK.c) -o $@ $(OBJS) $(COMMONOBJS) $(LDLIBS) 79 $(POST_PROCESS) 80 81install : $(PROG) $(ROOTPROG) $(SUBDIRS) 82 83catalog: $(POFILE) 84 85$(POFILE): $(POFILES) 86 $(RM) $@ 87 cat $(POFILES) > $@ 88 89 90clean : $(SUBDIRS) 91 $(RM) $(OBJS) $(COMMONOBJS) 92 93strip : 94 $(STRIP) $(PROG) 95 96lint : lint_SRCS 97 98include ../../Makefile.targ 99 100# additional dependency for clobber which is defined in Makefile.targ 101clobber : $(SUBDIRS) 102 103$(SUBDIRS) : FRC 104 @cd $@; pwd; $(MAKE) $(TARGET) 105 106FRC: 107