xref: /titanic_52/usr/src/tools/cpcgen/Makefile (revision 53548f91e84cd97a638c23b5b295cc69089a5030)
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 (c) 2018, Joyent, Inc.
14#
15
16PROG	= cpcgen
17OBJS	= cpcgen.o json_nvlist.o custr.o
18
19include ../Makefile.tools
20
21LDLIBS	+= -lnvpair
22CPPFLAGS += -I$(SRC)/lib/json_nvlist/ -I$(SRC)/lib/libcustr/common
23
24all: $(PROG)
25
26install: all .WAIT $(ROOTONBLDMACHPROG)
27
28$(PROG): $(OBJS)
29	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
30	$(POST_PROCESS)
31
32%.o: %.c
33	$(COMPILE.c) $<
34
35%.o: $(SRC)/lib/json_nvlist/%.c
36	$(COMPILE.c) $<
37
38%.o: $(SRC)/lib/libcustr/common/%.c
39	$(COMPILE.c) $<
40
41clean:
42	$(RM) $(OBJS)
43
44include ../Makefile.targ
45