xref: /illumos-gate/usr/src/cmd/lofiadm/Makefile (revision d3b5f56344d8bfcdd6cfb82446af0e5e55ad9ebe)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
51d8ed0f0Svikram# Common Development and Distribution License (the "License").
61d8ed0f0Svikram# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate#
227c478bd9Sstevel@tonic-gate#
23b1efbcd6SAlok Aggarwal# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
241d8ed0f0Svikram# Use is subject to license terms.
257c478bd9Sstevel@tonic-gate#
265661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc.
277c478bd9Sstevel@tonic-gate
287c478bd9Sstevel@tonic-gatePROG= lofiadm
297c478bd9Sstevel@tonic-gateOBJS= main.o utils.o
30b1efbcd6SAlok AggarwalLZMAOBJS= LzmaEnc.o LzFind.o
31b1efbcd6SAlok Aggarwal
327c478bd9Sstevel@tonic-gateSRCS= $(OBJS:%.o=%.c)
33b1efbcd6SAlok Aggarwal
347c478bd9Sstevel@tonic-gatePOFILES= $(OBJS:%.o=%.po)
357c478bd9Sstevel@tonic-gate
367c478bd9Sstevel@tonic-gateinclude ../Makefile.cmd
377c478bd9Sstevel@tonic-gate
38b1efbcd6SAlok AggarwalCPPFLAGS += -I $(SRC)/common/crypto -I $(SRC)/common/lzma
397d82f0f8SDina K NimehLDLIBS += -ldevinfo -lpkcs11 -lcryptoutil
401d8ed0f0Svikram
417014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses
42*d3b5f563SJohn LevonCERRWARN += $(CNOWARN_UNINIT)
437014882cSRichard Lowe
445661bb76SJohn Levon# not linted
455661bb76SJohn LevonSMATCH=off
465661bb76SJohn Levon
47b1efbcd6SAlok AggarwalLINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2
48b1efbcd6SAlok Aggarwal
497c478bd9Sstevel@tonic-gate.KEEP_STATE:
507c478bd9Sstevel@tonic-gate
51b1efbcd6SAlok Aggarwalall: $(LZMAOBJS) $(PROG) $(POFILE)
52b1efbcd6SAlok Aggarwal
53b1efbcd6SAlok AggarwalLzmaEnc.o:	$(SRC)/common/lzma/LzmaEnc.c
54b1efbcd6SAlok Aggarwal	$(COMPILE.c) -o $@ $(SRC)/common/lzma/LzmaEnc.c
55b1efbcd6SAlok Aggarwal	$(POST_PROCESS)
56b1efbcd6SAlok Aggarwal
57b1efbcd6SAlok AggarwalLzFind.o:	$(SRC)/common/lzma/LzFind.c
58b1efbcd6SAlok Aggarwal	$(COMPILE.c) -o $@ $(SRC)/common/lzma/LzFind.c
59b1efbcd6SAlok Aggarwal	$(POST_PROCESS)
607c478bd9Sstevel@tonic-gate
617c478bd9Sstevel@tonic-gate$(PROG): $(OBJS)
62b1efbcd6SAlok Aggarwal	$(LINK.c) -o $@ $(OBJS) $(LZMAOBJS) $(LDLIBS)
637c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
647c478bd9Sstevel@tonic-gate
657c478bd9Sstevel@tonic-gateinstall: all $(ROOTUSRSBINPROG)
667c478bd9Sstevel@tonic-gate
677c478bd9Sstevel@tonic-gate$(POFILE): $(POFILES)
687c478bd9Sstevel@tonic-gate	$(RM) $@
697c478bd9Sstevel@tonic-gate	cat $(POFILES) > $@
707c478bd9Sstevel@tonic-gate
717c478bd9Sstevel@tonic-gateclean:
72b1efbcd6SAlok Aggarwal	$(RM) $(PROG) $(OBJS) $(LZMAOBJS) $(POFILE) $(POFILES)
737c478bd9Sstevel@tonic-gate
747c478bd9Sstevel@tonic-gatelint:	lint_SRCS
757c478bd9Sstevel@tonic-gate
767c478bd9Sstevel@tonic-gateinclude ../Makefile.targ
77