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 2017 Nexenta Systems, Inc. All rights reserved.
  14 #
  15 
  16 LIBRARY= libkrrp.a
  17 VERS= .1
  18 
  19 OBJS_SHARED=                    \
  20         krrp_params.o           \
  21         krrp_ioctl_common.o
  22 
  23 OBJS_COMMON=                    \
  24         libkrrp_error.o         \
  25         libkrrp_event.o         \
  26         libkrrp_ioctl.o         \
  27         libkrrp_session.o       \
  28         libkrrp_svc.o           \
  29         libkrrp_util.o
  30 
  31 OBJECTS= $(OBJS_COMMON) $(OBJS_SHARED)
  32 
  33 include ../../Makefile.lib
  34 
  35 # install this library in the root filesystem
  36 include ../../Makefile.rootfs
  37 
  38 LIBS=           $(DYNLIB) $(LINTLIB)
  39 SRCDIR= ../common
  40 
  41 INCS += -I$(SRCDIR)
  42 INCS += -I../../../common/krrp
  43 
  44 LINTFLAGS +=    -erroff=E_INVALID_TOKEN_IN_DEFINE_MACRO
  45 LINTFLAGS64 +=  -erroff=E_INVALID_TOKEN_IN_DEFINE_MACRO
  46 
  47 LDLIBS +=       -lc -lnvpair -lumem -luuid -lsysevent -lzfs
  48 CPPFLAGS +=     $(INCS) -D_REENTRANT
  49 
  50 SRCS=   $(OBJS_COMMON:%.o=$(SRCDIR)/%.c)        \
  51         $(OBJS_SHARED:%.o=$(SRC)/common/krrp/%.c)
  52 $(LINTLIB) := SRCS=     $(SRCDIR)/$(LINTSRC)
  53 
  54 .KEEP_STATE:
  55 
  56 all: $(LIBS)
  57 
  58 lint: lintcheck
  59 
  60 pics/%.o: ../../../common/krrp/%.c
  61         $(COMPILE.c) -o $@ $<
  62         $(POST_PROCESS_O)
  63 
  64 include ../../Makefile.targ