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) 2018, Joyent, Inc. 26 27 include ../../Makefile.cmd 28 29 SUBDIRS = terms.d 30 31 PROG = nroff 32 33 OBJS = n10.o n6.o 34 35 COMMONOBJS = 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 38 SRCS = $(OBJS:%.o=%.c) $(COMMONOBJS:%.o=../%.c) 39 40 41 CPPFLAGS = -DNROFF -DUSG -DINCORE -DEUC -I. -I.. $(CPPFLAGS.master) 42 43 CERRWARN += -_gcc=-Wno-unused-value 44 CERRWARN += -_gcc=-Wno-extra 45 CERRWARN += -_gcc=-Wno-implicit-function-declaration 46 CERRWARN += -_gcc=-Wno-parentheses 47 CERRWARN += -_gcc=-Wno-unused-variable 48 49 # parse error: parsing (i (9223372034707292160-96) >= 65) 50 SMATCH = off 51 52 LDLIBS += -lmapmalloc 53 # 54 # message catalog 55 # 56 POFILES= $(OBJS:%.o=%.po) 57 POFILE= nroff.d.po 58 59 60 all := TARGET= all 61 install := TARGET= install 62 clean := TARGET= clean 63 clobber := TARGET= clobber 64 lint := TARGET= lint 65 strip := 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 75 all : $(PROG) $(SUBDIRS) 76 77 $(PROG) : $(OBJS) $(COMMONOBJS) 78 $(LINK.c) -o $@ $(OBJS) $(COMMONOBJS) $(LDLIBS) 79 $(POST_PROCESS) 80 81 install : $(PROG) $(ROOTPROG) $(SUBDIRS) 82 83 catalog: $(POFILE) 84 85 $(POFILE): $(POFILES) 86 $(RM) $@ 87 cat $(POFILES) > $@ 88 89 90 clean : $(SUBDIRS) 91 $(RM) $(OBJS) $(COMMONOBJS) 92 93 strip : 94 $(STRIP) $(PROG) 95 96 lint : lint_SRCS 97 98 include ../../Makefile.targ 99 100 # additional dependency for clobber which is defined in Makefile.targ 101 clobber : $(SUBDIRS) 102 103 $(SUBDIRS) : FRC 104 @cd $@; pwd; $(MAKE) $(TARGET) 105 106 FRC: