xref: /illumos-gate/usr/src/tools/cpcgen/Makefile (revision 1b09309c5ebed5c0bf14e2b396bf626c5aa30034)
17e3dbbacSRobert Mustacchi#
27e3dbbacSRobert Mustacchi# This file and its contents are supplied under the terms of the
37e3dbbacSRobert Mustacchi# Common Development and Distribution License ("CDDL"), version 1.0.
47e3dbbacSRobert Mustacchi# You may only use this file in accordance with the terms of version
57e3dbbacSRobert Mustacchi# 1.0 of the CDDL.
67e3dbbacSRobert Mustacchi#
77e3dbbacSRobert Mustacchi# A full copy of the text of the CDDL should have accompanied this
87e3dbbacSRobert Mustacchi# source.  A copy of the CDDL is also available via the Internet at
97e3dbbacSRobert Mustacchi# http://www.illumos.org/license/CDDL.
107e3dbbacSRobert Mustacchi#
117e3dbbacSRobert Mustacchi
127e3dbbacSRobert Mustacchi#
137e3dbbacSRobert Mustacchi# Copyright (c) 2018, Joyent, Inc.
147e3dbbacSRobert Mustacchi#
157e3dbbacSRobert Mustacchi
167e3dbbacSRobert MustacchiPROG	= cpcgen
177e3dbbacSRobert MustacchiOBJS	= cpcgen.o json_nvlist.o custr.o
187e3dbbacSRobert Mustacchi
197e3dbbacSRobert Mustacchiinclude ../Makefile.tools
207e3dbbacSRobert Mustacchi
217e3dbbacSRobert MustacchiLDLIBS	+= -lnvpair
225801b0f0SToomas SoomeNATIVE_LIBS += libnvpair.so
237e3dbbacSRobert MustacchiCPPFLAGS += -I$(SRC)/lib/json_nvlist/ -I$(SRC)/lib/libcustr/common
247e3dbbacSRobert Mustacchi
25*1b09309cSRobert Mustacchi#
26*1b09309cSRobert Mustacchi# While cpcgen doesn't do 64-bit I/O, builds on NFS in particular have
27*1b09309cSRobert Mustacchi# failed due to what is probably the use of 64-bit inodes.
28*1b09309cSRobert Mustacchi#
29*1b09309cSRobert MustacchiCPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
30*1b09309cSRobert Mustacchi
317e3dbbacSRobert Mustacchiall: $(PROG)
327e3dbbacSRobert Mustacchi
337e3dbbacSRobert Mustacchiinstall: all .WAIT $(ROOTONBLDMACHPROG)
347e3dbbacSRobert Mustacchi
357e3dbbacSRobert Mustacchi$(PROG): $(OBJS)
367e3dbbacSRobert Mustacchi	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
377e3dbbacSRobert Mustacchi	$(POST_PROCESS)
387e3dbbacSRobert Mustacchi
397e3dbbacSRobert Mustacchi%.o: %.c
407e3dbbacSRobert Mustacchi	$(COMPILE.c) $<
417e3dbbacSRobert Mustacchi
427e3dbbacSRobert Mustacchi%.o: $(SRC)/lib/json_nvlist/%.c
437e3dbbacSRobert Mustacchi	$(COMPILE.c) $<
447e3dbbacSRobert Mustacchi
457e3dbbacSRobert Mustacchi%.o: $(SRC)/lib/libcustr/common/%.c
467e3dbbacSRobert Mustacchi	$(COMPILE.c) $<
477e3dbbacSRobert Mustacchi
487e3dbbacSRobert Mustacchiclean:
497e3dbbacSRobert Mustacchi	$(RM) $(OBJS)
507e3dbbacSRobert Mustacchi
517e3dbbacSRobert Mustacchiinclude ../Makefile.targ
52