xref: /illumos-gate/usr/src/tools/yacc/Makefile (revision 1a90c98d7539778aeb0a1d20f735b66aaba17fca)
1#
2# This file and its contents are supplied under the terms of the
3# Common Development and Distribution License ("CDDL"), version 1.0.
4# You may only use this file in accordance with the terms of version
5# 1.0 of the CDDL.
6#
7# A full copy of the text of the CDDL should have accompanied this
8# source.  A copy of the CDDL is also available via the Internet at
9# http://www.illumos.org/license/CDDL.
10#
11
12#
13# Copyright 2024 Toomas Soome <tsoome@me.com>
14#
15
16PROG =		yacc
17
18SGSDIR =	../../cmd/sgs
19SRCDIR =	$(SGSDIR)/yacc/common
20
21OBJS =		y1.o y2.o y3.o y4.o
22
23include ../Makefile.tools
24
25CPPFLAGS =	-I$(SGSDIR)/include
26
27.KEEP_STATE:
28
29all:	$(PROG)
30
31$(PROG):	$(OBJS)
32	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
33	$(POST_PROCESS)
34
35%.o:	$(SRCDIR)/%.c
36	$(COMPILE.c) -o $@ $<
37
38install: all $(ROOTONBLDMACHPROG) $(ROOTONBLDLIB)/yaccpar
39
40$(ROOTONBLDLIB)/%: $(SGSDIR)/yacc/common/%
41	$(INS.file)
42
43clean:
44	$(RM) $(PROG) $(OBJS)
45
46include	../Makefile.targ
47