xref: /illumos-gate/usr/src/tools/localedef/Makefile (revision 9b9d39d2a32ff806d2431dbcc50968ef1e6d46b2)
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 2017 Nexenta Systems, Inc.
14# Copyright 2011 EveryCity Ltd. All rights reserved.
15# Copyright 2013 DEY Storage Systems, Inc.
16# Copyright 2016 Joyent, Inc.
17#
18
19CMDDIR=		$(SRC)/cmd/localedef
20
21include		$(SRC)/tools/Makefile.tools
22include		$(CMDDIR)/Makefile.common
23
24OBJS +=		avl.o \
25		mkdirp.o
26
27CPPFLAGS +=	-I$(CMDDIR) -I.
28
29.KEEP_STATE:
30
31all:		$(PROG)
32
33parser.tab.c parser.tab.h: $(CMDDIR)/parser.y $(CMDDIR)/localedef.h
34		$(YACC) $(YFLAGS) $(CMDDIR)/parser.y
35
36$(OBJS):	parser.tab.h
37
38$(PROG):	$(OBJS)
39		$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
40		$(POST_PROCESS)
41
42%.o:		$(CMDDIR)/%.c
43		$(COMPILE.c) -o $@ $<
44
45avl.o:		$(SRC)/common/avl/avl.c
46		$(COMPILE.c) -o $@ $(SRC)/common/avl/avl.c
47
48mkdirp.o:	$(SRC)/lib/libgen/common/mkdirp.c
49		$(COMPILE.c) -o $@ $(SRC)/lib/libgen/common/mkdirp.c
50
51install:	all $(ROOTONBLDMACHPROG)
52
53clean:
54		$(RM) $(PROG) $(CLEANFILES)
55
56include		$(SRC)/tools/Makefile.targ
57