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 # Copyright (c) 2012 by Delphix. All rights reserved.
  13 # Copyright 2016 Nexenta Systems, Inc.  All rights reserved.
  14 #
  15 include $(SRC)/cmd/Makefile.cmd
  16 
  17 TEST = other_tests/domain
  18 SHRSRC = dns.test.nfs.master.tmpl dns.test.nfs.reverse.master.tmpl \
  19         domain.flist named.conf.tmpl nfs.master.tmpl root.master.tmpl \
  20         test.nfs.master.tmpl README
  21 TCS = dnscfg dom_env dom_functions libmapid_syscfgd libmapid01 \
  22         libmapid02 libmapid03 libmapid04 libmapid05 nfsmapid01 \
  23         nfsmapid02 nfsmapid03 nfsmapid04 runtests
  24 TCLSRC =
  25 
  26 include ../../Makefile.test
  27 
  28 #
  29 # Build binaries from C sources
  30 #
  31 PROGS= check_domain_dl check_domain_mt check_domain derive_domain_dl \
  32         get_domain_mt get_domain reeval_callback resolv
  33 
  34 SRCS = $(PROGS:%=%.c)
  35 OBJS = $(PROGS:%=%.o)
  36 
  37 CFLAGS = -erroff=%all   # Ignore all lint msg now
  38 check_domain_dl derive_domain_dl resolv := LDLIBS += -lresolv
  39 check_domain_mt check_domain get_domain_mt \
  40 get_domain reeval_callback := LDLIBS += -lresolv \
  41         -L$(ROOT)/usr/lib/nfs -R/usr/lib/nfs -lmapid
  42 LDFLAGS += -zignore
  43 
  44 BINS = $(PROGS:%=$(TESTDIR)/%)
  45 $(BINS) := FILEMODE = 0555
  46 
  47 all install: $(BINS)
  48 
  49 $(PROGS): $(OBJS)
  50         $(LINK.c) $@.o -o $@ $(LDLIBS)
  51         $(POST_PROCESS)
  52 
  53 lint:
  54         for src in $(SRCS); \
  55         do \
  56         $(LINT.c) $(CFLAGS) $${src} $(LDLIBS); \
  57         done
  58 
  59 clobber clean:
  60         -$(RM) $(OBJS) $(PROGS)
  61 
  62 $(TESTDIR)/%: %
  63         $(INS.file)