xref: /illumos-gate/usr/src/tools/cpcgen/Makefile (revision 6f1fa39e3cf1b335f342bbca41590e9d76ab29b7)
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
22NATIVE_LIBS += libnvpair.so
23CPPFLAGS += -I$(SRC)/lib/json_nvlist/ -I$(SRC)/lib/libcustr/common
24
25all: $(PROG)
26
27install: all .WAIT $(ROOTONBLDMACHPROG)
28
29$(PROG): $(OBJS)
30	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
31	$(POST_PROCESS)
32
33%.o: %.c
34	$(COMPILE.c) $<
35
36%.o: $(SRC)/lib/json_nvlist/%.c
37	$(COMPILE.c) $<
38
39%.o: $(SRC)/lib/libcustr/common/%.c
40	$(COMPILE.c) $<
41
42clean:
43	$(RM) $(OBJS)
44
45include ../Makefile.targ
46