1*2e072778SToomas Soome# 2*2e072778SToomas Soome# This file and its contents are supplied under the terms of the 3*2e072778SToomas Soome# Common Development and Distribution License ("CDDL"), version 1.0. 4*2e072778SToomas Soome# You may only use this file in accordance with the terms of version 5*2e072778SToomas Soome# 1.0 of the CDDL. 6*2e072778SToomas Soome# 7*2e072778SToomas Soome# A full copy of the text of the CDDL should have accompanied this 8*2e072778SToomas Soome# source. A copy of the CDDL is also available via the Internet at 9*2e072778SToomas Soome# http://www.illumos.org/license/CDDL. 10*2e072778SToomas Soome# 11*2e072778SToomas Soome 12*2e072778SToomas Soome# 13*2e072778SToomas Soome# Copyright 2024 MNX Cloud, Inc. 14*2e072778SToomas Soome# 15*2e072778SToomas Soome 16*2e072778SToomas SoomePROG = lex 17*2e072778SToomas Soome 18*2e072778SToomas SoomeSGSDIR = ../../cmd/sgs 19*2e072778SToomas SoomeSRCDIR = $(SGSDIR)/lex/common 20*2e072778SToomas Soome 21*2e072778SToomas SoomeOBJS = main.o sub1.o sub2.o sub3.o header.o parser.o 22*2e072778SToomas Soome 23*2e072778SToomas Soomeinclude ../Makefile.tools 24*2e072778SToomas Soome 25*2e072778SToomas SoomeCPPFLAGS = -I$(SGSDIR)/include 26*2e072778SToomas SoomeCSTD= $(CSTD_GNU99) 27*2e072778SToomas Soome 28*2e072778SToomas Soome# unused labels in yaccpar 29*2e072778SToomas SoomeCERRWARN += -_gnu=-Wno-unused-label 30*2e072778SToomas Soome 31*2e072778SToomas SoomeFORMS = nceucform ncform nrform 32*2e072778SToomas SoomeROOTFORMS = $(FORMS:%=$(ROOTONBLDSHLIBCCS)/%) 33*2e072778SToomas Soome 34*2e072778SToomas Soome.KEEP_STATE: 35*2e072778SToomas Soome 36*2e072778SToomas Soomeall: $(PROG) 37*2e072778SToomas Soome 38*2e072778SToomas Soome$(PROG): $(OBJS) 39*2e072778SToomas Soome $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 40*2e072778SToomas Soome $(POST_PROCESS) 41*2e072778SToomas Soome 42*2e072778SToomas Soome%.o: $(SRCDIR)/%.c 43*2e072778SToomas Soome $(COMPILE.c) -o $@ $< 44*2e072778SToomas Soome 45*2e072778SToomas Soomeinstall: all $(ROOTONBLDMACHPROG) $(ROOTFORMS) 46*2e072778SToomas Soome 47*2e072778SToomas Soomeclean: 48*2e072778SToomas Soome $(RM) $(PROG) $(OBJS) 49*2e072778SToomas Soome 50*2e072778SToomas Soome$(ROOTONBLDSHLIBCCS)/%: $(SRCDIR)/% 51*2e072778SToomas Soome $(INS.file) 52*2e072778SToomas Soome 53*2e072778SToomas Soomeinclude ../Makefile.targ 54