xref: /illumos-gate/usr/src/tools/mandoc/Makefile (revision b7daf79982d77b491ef9662483cd4549e0e5da9a)
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 2017 Joyent, Inc.
15#
16
17CMDDIR=		$(SRC)/cmd/mandoc
18LCDIR=		$(SRC)/lib/libc/port
19
20include		$(SRC)/tools/Makefile.tools
21include		$(CMDDIR)/Makefile.common
22
23OBJS +=		fts.o \
24		reallocarray.o \
25		strtonum.o
26
27CPPFLAGS +=	-I. -include config.h -include fts.h
28CPPFLAGS +=	-I$(NATIVE_ADJUNCT)/include
29LDFLAGS +=	-L$(NATIVE_ADJUNCT)/lib -R$(NATIVE_ADJUNCT)/lib
30
31.KEEP_STATE:
32
33all:		$(PROG)
34
35install:	all $(ROOTONBLDMACHPROG)
36
37clean:
38		$(RM) $(PROG) $(OBJS)
39
40$(PROG):	$(OBJS)
41		$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
42		$(POST_PROCESS)
43
44%.o:		$(CMDDIR)/%.c
45		$(COMPILE.c) -o $@ $<
46
47%.o:		$(LCDIR)/gen/%.c
48		$(COMPILE.c) -o $@ $<
49
50include		$(SRC)/tools/Makefile.targ
51