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# 7 8include ../../Makefile.cmd 9 10PROG = eqn 11 12CSRCS = diacrit.c eqnbox.c font.c fromto.c funny.c \ 13 glob.c integral.c io.c lex.c lookup.c \ 14 mark.c matrix.c move.c over.c paren.c \ 15 pile.c shift.c size.c sqrt.c text.c 16 17SRCS = $(CSRCS:%=../%) 18 19YACCSRC = e.y 20 21COBJS = $(CSRCS:%.c=%.o) 22OBJS = $(YACCSRC:%.y=%.o) $(COBJS) 23 24# 25# for message catalog 26# 27POFILE= eqn.d.po 28POFILES= $(SRCS:%.c=%.po) e.po 29 30CLEANFILES = y.tab.c y.tab.h $(YACCSRC:%.y=%.c) $(YACCSRC:%.y=%.def) 31 32YFLAGS = -d 33CPPFLAGS = -I. -I.. $(CPPFLAGS.master) 34LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%) 35 36CERRWARN += -_gcc=-Wno-implicit-function-declaration 37CERRWARN += -_gcc=-Wno-unused-label 38CERRWARN += $(CNOWARN_UNINIT) 39 40# not linted 41SMATCH=off 42 43.KEEP_STATE: 44 45all : $(PROG) 46 47catalog: $(POFILE) 48 49$(POFILE): e.def $(POFILES) 50 $(RM) $@ 51 cat $(POFILES) > $@ 52 53$(PROG) : $(OBJS) $(MAPFILE.NGB) 54 $(LINK.c) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS) 55 $(POST_PROCESS) 56 57$(YACCSRC:%.y=%.c) + $(YACCSRC:%.y=%.def) : ../$(YACCSRC) 58 $(YACC.y) ../$(YACCSRC) 59 $(MV) y.tab.c $(YACCSRC:%.y=%.c) 60 $(MV) y.tab.h $(YACCSRC:%.y=%.def) 61 62$(COBJS) : $$(@:%.o=../%.c) 63 $(COMPILE.c) ../$(@:%.o=%.c) 64 65install : all $(ROOTPROG) 66 67clean: 68 $(RM) $(OBJS) $(CLEANFILES) 69 70include ../../Makefile.targ 71