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 
  28 PROG= libinst.a
  29 
  30 OBJS=   copyf.o         dockdeps.o      echo.o          eptstat.o       \
  31         finalck.o       findscripts.o   fixpath.o       flex_dev.o      \
  32         isreloc.o       lockinst.o      mntinfo.o       nblk.o          \
  33         ocfile.o        pathdup.o       pkgdbmerg.o     procmap.o       \
  34         pkgobjmap.o     ptext.o         putparam.o                      \
  35         qreason.o       qstrdup.o       setadmin.o      setlist.o       \
  36         srcpath.o       scriptvfy.o     doulimit.o      \
  37         dryrun.o        listmgr.o       is_local_host.o cvtpath.o       \
  38         depchk.o        pkgops.o        sml.o           log.o           \
  39         setup_temporary_directory.o     open_package_datastream.o       \
  40         unpack_package_from_stream.o
  41 SRCS = $(OBJS:.o=.c)
  42 
  43 include $(SRC)/cmd/Makefile.cmd
  44 
  45 #
  46 # For messaging catalog
  47 POFILE = libinst.po
  48 MSGFILES=$(OBJS:%.o=%.i) 
  49 
  50 CPPFLAGS +=     -I$(SRC)/cmd/svr4pkg/hdrs \
  51                 -I$(SRC)/lib/libpkg/common \
  52                 -I$(SRC)/lib/libinstzones/common \
  53                 -D_FILE_OFFSET_BITS=64
  54 
  55 # For VERBOSE mode
  56 #CPPFLAGS +=    -DVERBOSE
  57 
  58 # For stop-in-your-tracks debugging
  59 #CPPFLAGS +=    -DBUG_DEBUG
  60 
  61 # Lint flags 
  62 #
  63 LINTFLAGS += -un
  64 
  65 CERRWARN += -_gcc=-Wno-parentheses
  66 CERRWARN += -_gcc=-Wno-implicit-function-declaration
  67 CERRWARN += -_gcc=-Wno-uninitialized
  68 CERRWARN += -_gcc=-Wno-clobbered
  69 CERRWARN += -_gcc=-Wno-unused-variable
  70 
  71 .KEEP_STATE:
  72 
  73 all: $(PROG)
  74 
  75 $(PROG): $(OBJS)
  76         $(RM) $@
  77         $(AR) $(ARFLAGS) $@ $(OBJS)
  78         $(POST_PROCESS_A)
  79 
  80 install: all
  81         @echo "$(PROG) is a static library and will not be installed."
  82 
  83 $(POFILE): $(MSGFILES)
  84         $(BUILDPO.msgfiles)
  85 
  86 _msg: $(MSGDOMAINPOFILE)
  87 
  88 clean:
  89         $(RM) $(OBJS) $(MSGFILES)
  90 
  91 clobber: clean
  92         $(RM) $(PROG) $(POFILE)
  93 
  94 include $(SRC)/Makefile.msg.targ