xref: /illumos-gate/usr/src/cmd/svr4pkg/libinst/Makefile (revision 689b9301078f0c35c7f198fcee8032a0d30eff3a)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21
22#
23# Copyright (c) 2017 Peter Tribble.
24# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27# Copyright (c) 2018, Joyent, Inc.
28
29PROG= libinst.a
30
31OBJS=	copyf.o         dockdeps.o      echo.o          eptstat.o       \
32	finalck.o       findscripts.o   fixpath.o       flex_dev.o      \
33	isreloc.o       lockinst.o      mntinfo.o       nblk.o          \
34	ocfile.o        pathdup.o       pkgdbmerg.o     procmap.o       \
35	pkgobjmap.o     ptext.o         putparam.o                      \
36	qreason.o       qstrdup.o       setadmin.o      setlist.o       \
37	srcpath.o       scriptvfy.o     doulimit.o      \
38	dryrun.o        listmgr.o       is_local_host.o cvtpath.o       \
39	depchk.o        pkgops.o        sml.o           log.o           \
40	setup_temporary_directory.o     open_package_datastream.o       \
41	unpack_package_from_stream.o
42SRCS = $(OBJS:.o=.c)
43
44include	$(SRC)/cmd/Makefile.cmd
45
46#
47# For messaging catalog
48POFILE = libinst.po
49MSGFILES=$(OBJS:%.o=%.i)
50
51CPPFLAGS +=	-I$(SRC)/cmd/svr4pkg/hdrs \
52		-I$(SRC)/lib/libpkg/common \
53		-I$(SRC)/lib/libinstzones/common \
54		-D_FILE_OFFSET_BITS=64
55
56# For VERBOSE mode
57#CPPFLAGS +=	-DVERBOSE
58
59# For stop-in-your-tracks debugging
60#CPPFLAGS +=	-DBUG_DEBUG
61
62CERRWARN += -_gcc=-Wno-parentheses
63CERRWARN += -_gcc=-Wno-implicit-function-declaration
64CERRWARN += -_gcc=-Wno-clobbered
65CERRWARN += -_gcc=-Wno-unused-variable
66
67# too many issues
68SMATCH=off
69
70.KEEP_STATE:
71
72all: $(PROG)
73
74$(PROG): $(OBJS)
75	$(RM) $@
76	$(AR) $(ARFLAGS) $@ $(OBJS)
77	$(POST_PROCESS_A)
78
79install: all
80	@echo "$(PROG) is a static library and will not be installed."
81
82$(POFILE): $(MSGFILES)
83	$(BUILDPO.msgfiles)
84
85_msg: $(MSGDOMAINPOFILE)
86
87clean:
88	$(RM) $(OBJS) $(MSGFILES)
89
90clobber: clean
91	$(RM) $(PROG) $(POFILE)
92
93include	$(SRC)/Makefile.msg.targ
94