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 2012 Nexenta Systems, Inc.  All rights reserved.
  14 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
  15 #
  16 
  17 PROGS=          mandoc mandoc_preconv
  18 mandoc_OBJS =   arch.o att.o chars.o eqn.o eqn_html.o eqn_term.o        \
  19                 html.o lib.o main.o man.o man_hash.o man_html.o         \
  20                 man_macro.o man_term.o man_validate.o mandoc.o mdoc.o   \
  21                 mdoc_argv.o mdoc_hash.o mdoc_html.o mdoc_macro.o        \
  22                 mdoc_man.o mdoc_term.o mdoc_validate.o msec.o out.o     \
  23                 read.o roff.o st.o tbl.o tbl_data.o tbl_html.o          \
  24                 tbl_layout.o tbl_opts.o tbl_term.o term.o term_ascii.o  \
  25                 term_ps.o tree.o vol.o
  26 
  27 preconv_OBJS =  preconv.o
  28 
  29 # We place preconv in /usr/lib.  This is done to avoid conflicting with
  30 # GNU groff, which puts it into /usr/bin.  We also rename it so that it
  31 # will only be seen by mandoc -- it isn't intended for general end-user use.
  32 
  33 ROOTPROGS =     $(ROOTBIN)/mandoc $(ROOTLIB)/mandoc_preconv
  34 
  35 OBJS=           $(preconv_OBJS) $(mandoc_OBJS)
  36 
  37 include         $(SRC)/cmd/Makefile.cmd
  38 
  39 CFLAGS +=       $(CC_VERBOSE)
  40 
  41 CPPFLAGS +=     -DHAVE_CONFIG_H -DUSE_WCHAR     \
  42                 -DOSNAME="\"illumos\""  \
  43                 -DVERSION="\"1.12.1\""
  44 
  45 .KEEP_STATE:
  46 
  47 all:            $(PROGS)
  48 
  49 mandoc_preconv: $(preconv_OBJS)
  50                 $(LINK.c) $(preconv_OBJS) -o $@ $(LDLIBS)
  51                 $(POST_PROCESS)
  52 
  53 mandoc:         $(mandoc_OBJS)
  54                 $(LINK.c) $(mandoc_OBJS) -o $@ $(LDLIBS)
  55                 $(POST_PROCESS)
  56 
  57 clean:
  58                 $(RM) $(OBJS)
  59 
  60 install:        all $(ROOTPROGS)
  61 
  62 include         $(SRC)/cmd/Makefile.targ