xref: /illumos-gate/usr/src/cmd/idmap/idmap/Makefile (revision d17be682)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
23#
24# Copyright (c) 2018, Joyent, Inc.
25
26PROG =		idmap
27CLIENTOBJS =	idmap.o idmap_engine.o namemaps.o
28# idmap_clnt.o
29POFILES =	$(CLIENTOBJS:.o=.po)
30OBJS =		$(CLIENTOBJS)
31IDMAP_PROT_DIR =        $(SRC)/head/rpcsvc
32
33include ../../Makefile.cmd
34
35CERRWARN +=	-_gcc=-Wno-parentheses
36CERRWARN +=	-_gcc=-Wno-switch
37CERRWARN +=	-_gcc=-Wno-unused-label
38CERRWARN +=	-_gcc=-Wno-char-subscripts
39CERRWARN +=	-_gcc=-Wno-unused-function
40CERRWARN +=	$(CNOWARN_UNINIT)
41CERRWARN +=	-_gcc=-Wno-address
42
43# not linted
44SMATCH=off
45
46POFILE =	$(PROG)_all.po
47LDLIBS +=	-lidmap -ladutils -lsldap -lldap
48FILEMODE =	0555
49
50INCS += -I. \
51	-I../../../lib/libidmap/common \
52	-I../../../lib/libadutils/common \
53	-I../../../lib/libsldap/common \
54	-I$(IDMAP_PROT_DIR)
55
56CFLAGS += $(CCVERBOSE)
57$(OBJS) :=	CPPFLAGS += $(INCS) -D_REENTRANT
58$(POFILE) :=	CPPFLAGS += $(INCS)
59
60.KEEP_STATE:
61
62all: $(PROG)
63
64$(PROG): $(OBJS)
65	$(LINK.c) $(CCGDEBUG) -o $@ $(OBJS) $(LDLIBS)
66	$(POST_PROCESS)
67
68$(POFILE): $(POFILES)
69	$(RM) $@
70	cat $(POFILES) > $@
71
72install: all $(ROOTUSRSBINPROG)
73
74clean:
75	$(RM) $(OBJS)
76
77include ../../Makefile.targ
78
79
80