1# 2# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 3# Use is subject to license terms. 4# 5# Copyright (c) 2018, Joyent, Inc. 6 7include ../../Makefile.cmd 8 9PROG = neqn 10 11CSRCS = diacrit.c eqnbox.c font.c fromto.c funny.c \ 12 glob.c integral.c io.c lex.c lookup.c \ 13 mark.c matrix.c move.c over.c paren.c \ 14 pile.c shift.c size.c sqrt.c text.c 15 16SRCS = $(CSRCS:%=../%) 17 18YACCSRC = e.y 19 20COBJS = $(CSRCS:%.c=%.o) 21OBJS = $(YACCSRC:%.y=%.o) $(COBJS) 22 23 24CLEANFILES = y.tab.c y.tab.h $(YACCSRC:%.y=%.c) $(YACCSRC:%.y=%.def) 25 26YFLAGS = -d 27CPPFLAGS = -DNEQN -I. -I.. $(CPPFLAGS.master) 28LDFLAGS += $(MAPFILE.NGB:%=-M%) 29 30CERRWARN += -_gcc=-Wno-implicit-function-declaration 31CERRWARN += $(CNOWARN_UNINIT) 32CERRWARN += -_gcc=-Wno-unused-label 33 34# not linted 35SMATCH=off 36 37# 38# for message catalog 39# 40POFILE= neqn.d.po 41POFILES= e.po 42 43.KEEP_STATE: 44 45all : $(PROG) 46 47$(PROG) : $(OBJS) $(MAPFILE.NGB) 48 $(LINK.c) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS) 49 $(POST_PROCESS) 50 51catalog: $(POFILE) 52 53$(POFILE): $(POFILES) 54 $(RM) $@ 55 cat $(POFILES) > $@ 56 57 58$(YACCSRC:%.y=%.c) + $(YACCSRC:%.y=%.def) : ../$(YACCSRC) 59 $(YACC.y) ../$(YACCSRC) 60 $(MV) y.tab.c $(YACCSRC:%.y=%.c) 61 $(MV) y.tab.h $(YACCSRC:%.y=%.def) 62 63$(COBJS) : $$(@:%.o=../%.c) 64 $(COMPILE.c) ../$(@:%.o=%.c) 65 66install : all $(ROOTPROG) 67 68clean: 69 $(RM) $(OBJS) $(CLEANFILES) 70 71lint: lint_SRCS 72 73strip : 74 $(STRIP) $(PROG) 75 76include ../../Makefile.targ 77