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 25# 26# While cpcgen doesn't do 64-bit I/O, builds on NFS in particular have 27# failed due to what is probably the use of 64-bit inodes. 28# 29CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 30 31all: $(PROG) 32 33install: all .WAIT $(ROOTONBLDMACHPROG) 34 35$(PROG): $(OBJS) 36 $(LINK.c) -o $@ $(OBJS) $(LDLIBS) 37 $(POST_PROCESS) 38 39%.o: %.c 40 $(COMPILE.c) $< 41 42%.o: $(SRC)/lib/json_nvlist/%.c 43 $(COMPILE.c) $< 44 45%.o: $(SRC)/lib/libcustr/common/%.c 46 $(COMPILE.c) $< 47 48clean: 49 $(RM) $(OBJS) 50 51include ../Makefile.targ 52