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.
  14 # Copyright 2018 Joyent, Inc.
  15 #
  16 
  17 CMDDIR=         $(SRC)/cmd/mandoc
  18 LCDIR=          $(SRC)/lib/libc/port
  19 
  20 include         $(SRC)/tools/Makefile.tools
  21 include         $(CMDDIR)/Makefile.common
  22 
  23 OBJS +=         fts.o \
  24                 reallocarray.o \
  25                 recallocarray.o \
  26                 strtonum.o
  27 
  28 CPPFLAGS +=     -_gcc=-nostdinc
  29 CPPFLAGS +=     -I. -include fts.h
  30 CPPFLAGS +=     -I$(NATIVE_ADJUNCT)/include
  31 LDFLAGS +=      -L$(NATIVE_ADJUNCT)/lib -R$(NATIVE_ADJUNCT)/lib
  32 
  33 # 3rd party code
  34 SMATCH=off
  35 
  36 .KEEP_STATE:
  37 
  38 all:            $(PROG)
  39 
  40 install:        all $(ROOTONBLDMACHPROG)
  41 
  42 clean:
  43                 $(RM) $(PROG) $(OBJS)
  44 
  45 $(PROG):        $(OBJS)
  46                 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
  47                 $(POST_PROCESS)
  48 
  49 %.o:            $(CMDDIR)/%.c
  50                 $(COMPILE.c) -o $@ $<
  51 
  52 %.o:            $(LCDIR)/gen/%.c
  53                 $(COMPILE.c) -o $@ $<
  54 
  55 include         $(SRC)/tools/Makefile.targ