1 #
   2 # Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
   3 #
   4 
   5 #
   6 #       Path to the base of the uts directory tree (usually /usr/src/uts).
   7 #
   8 UTSBASE = ../..
   9 
  10 #
  11 #       Define the module and object file sets.
  12 #
  13 MODULE          = krrp
  14 OBJECTS         = $(KRRP_OBJS:%=$(OBJS_DIR)/%)
  15 LINTS           = $(KRRP_OBJS:%.o=$(LINTS_DIR)/%.ln)
  16 ROOTMODULE      = $(ROOT_DRV_DIR)/$(MODULE)
  17 CONF_SRCDIR     = $(UTSBASE)/common/io/krrp
  18 
  19 #
  20 #       Include common rules.
  21 #
  22 include $(UTSBASE)/intel/Makefile.intel
  23 
  24 #
  25 #       Define targets
  26 #
  27 ALL_TARGET      = $(BINARY) $(SRC_CONFILE)
  28 LINT_TARGET     = $(MODULE).lint
  29 INSTALL_TARGET  = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
  30 
  31 #
  32 # For now, disable these lint checks; maintainers should endeavor
  33 # to investigate and remove these for maximum lint coverage.
  34 # Please do not carry these forward to new Makefiles.
  35 #
  36 LINTTAGS        += -erroff=E_BAD_PTR_CAST_ALIGN
  37 LINTTAGS        += -erroff=E_ARGUEMENT_MISMATCH
  38 LINTTAGS        += -erroff=E_STATIC_UNUSED
  39 
  40 LDFLAGS     += -r -dy -N fs/zfs -N misc/ksocket
  41 
  42 INC_PATH        += -I$(UTSBASE)/common/fs/zfs
  43 INC_PATH        += -I$(COMMONBASE)/krrp
  44 INC_PATH        += -I$(COMMONBASE)/zfs
  45 
  46 CERRWARN    += -_gcc=-Wno-unused-variable
  47 
  48 #
  49 #       Default build targets.
  50 #
  51 .KEEP_STATE:
  52 
  53 def:            $(DEF_DEPS)
  54 
  55 all:            $(ALL_DEPS)
  56 
  57 clean:          $(CLEAN_DEPS)
  58 
  59 clobber:        $(CLOBBER_DEPS)
  60 
  61 lint:           $(LINT_DEPS)
  62 
  63 modlintlib:     $(MODLINTLIB_DEPS)
  64 
  65 clean.lint:     $(CLEAN_LINT_DEPS)
  66 
  67 install:        $(INSTALL_DEPS)
  68 
  69 #
  70 #       Include common targets.
  71 #
  72 include $(UTSBASE)/intel/Makefile.targ