xref: /illumos-gate/usr/src/cmd/idmap/idmapd/Makefile (revision c5c4113d)
1*c5c4113dSnw#
2*c5c4113dSnw# CDDL HEADER START
3*c5c4113dSnw#
4*c5c4113dSnw# The contents of this file are subject to the terms of the
5*c5c4113dSnw# Common Development and Distribution License (the "License").
6*c5c4113dSnw# You may not use this file except in compliance with the License.
7*c5c4113dSnw#
8*c5c4113dSnw# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*c5c4113dSnw# or http://www.opensolaris.org/os/licensing.
10*c5c4113dSnw# See the License for the specific language governing permissions
11*c5c4113dSnw# and limitations under the License.
12*c5c4113dSnw#
13*c5c4113dSnw# When distributing Covered Code, include this CDDL HEADER in each
14*c5c4113dSnw# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*c5c4113dSnw# If applicable, add the following below this CDDL HEADER, with the
16*c5c4113dSnw# fields enclosed by brackets "[]" replaced with your own identifying
17*c5c4113dSnw# information: Portions Copyright [yyyy] [name of copyright owner]
18*c5c4113dSnw#
19*c5c4113dSnw# CDDL HEADER END
20*c5c4113dSnw#
21*c5c4113dSnw#
22*c5c4113dSnw# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23*c5c4113dSnw# Use is subject to license terms.
24*c5c4113dSnw#
25*c5c4113dSnw#ident	"%Z%%M%	%I%	%E% SMI"
26*c5c4113dSnw#
27*c5c4113dSnw
28*c5c4113dSnwPROG =		idmapd
29*c5c4113dSnwMANIFEST =	idmap.xml
30*c5c4113dSnwSERVEROBJS =	idmapd.o init.o dbutils.o rpc_svc.o server.o adutils.o \
31*c5c4113dSnw	idmap_config.o
32*c5c4113dSnwSERVERSRCS =	$(SERVEROBJS:%.o=%.c)
33*c5c4113dSnwOBJS =		$(SERVEROBJS)
34*c5c4113dSnwSRCS =		$(SERVERSRCS)
35*c5c4113dSnwPOFILES =	$(OBJS:%.o=%.po)
36*c5c4113dSnw
37*c5c4113dSnwall :=		TARGET = all
38*c5c4113dSnwinstall :=	TARGET = install
39*c5c4113dSnwclean :=	TARGET = clean
40*c5c4113dSnwclobber :=	TARGET = clobber
41*c5c4113dSnw
42*c5c4113dSnwLIBSQLITE =	$(ROOT)/usr/lib/libsqlite.o
43*c5c4113dSnwSQLITELINT =	$(ROOT)/usr/lib/llib-lsqlite.ln
44*c5c4113dSnw
45*c5c4113dSnwIDMAP_PROT_DIR =        $(SRC)/head/rpcsvc
46*c5c4113dSnwIDMAP_PROT_X =          $(IDMAP_PROT_DIR)/idmap_prot.x
47*c5c4113dSnwIDMAP_PROT_H =          $(IDMAP_PROT_DIR)/idmap_prot.h
48*c5c4113dSnw
49*c5c4113dSnwinclude ../../Makefile.cmd
50*c5c4113dSnw
51*c5c4113dSnwPOFILE =	$(PROG)_all.po
52*c5c4113dSnw
53*c5c4113dSnwROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
54*c5c4113dSnw$(ROOTMANIFEST) := FILEMODE= 444
55*c5c4113dSnw
56*c5c4113dSnwINCS += -I. -I../../../lib/libidmap/common -I$(IDMAP_PROT_DIR)
57*c5c4113dSnw
58*c5c4113dSnw$(OBJS) := CPPFLAGS += $(INCS) -D_REENTRANT
59*c5c4113dSnw$(POFILE) := CPPFLAGS += $(INCS)
60*c5c4113dSnwCLOBBERFILES += $(IDMAP_PROT_H)
61*c5c4113dSnw
62*c5c4113dSnwCFLAGS += -v
63*c5c4113dSnwLDLIBS += -lsecdb -lnsl -lidmap -lscf -lldap
64*c5c4113dSnw
65*c5c4113dSnw$(PROG) := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
66*c5c4113dSnw$(PROG) := LDFLAGS += $(MAPFILES:%=-M%)
67*c5c4113dSnw
68*c5c4113dSnwDIRMODE = 0755
69*c5c4113dSnwFILEMODE = 0555
70*c5c4113dSnwOWNER = root
71*c5c4113dSnwGROUP = sys
72*c5c4113dSnw
73*c5c4113dSnwlint_SRCS := CPPFLAGS += $(INCS) -D_REENTRANT
74*c5c4113dSnwlint := LDLIBS += $(SQLITELINT)
75*c5c4113dSnw
76*c5c4113dSnw.KEEP_STATE:
77*c5c4113dSnw
78*c5c4113dSnw.PARALLEL: $(OBJS)
79*c5c4113dSnw
80*c5c4113dSnwall: $(PROG)
81*c5c4113dSnw
82*c5c4113dSnw$(IDMAP_PROT_H):	$(IDMAP_PROT_X)
83*c5c4113dSnw	$(RM) $@; $(RPCGEN) -CMNh -o $@ $(IDMAP_PROT_X)
84*c5c4113dSnw
85*c5c4113dSnw$(PROG): $(IDMAP_PROT_H) $(OBJS) $$(MAPFILES)
86*c5c4113dSnw	$(LINK.c) -o $@ $(OBJS) $(LIBSQLITE) $(LDLIBS)
87*c5c4113dSnw	$(POST_PROCESS)
88*c5c4113dSnw
89*c5c4113dSnw$(POFILE): $(POFILES)
90*c5c4113dSnw	$(RM) $(POFILE)
91*c5c4113dSnw	cat $(POFILES) > $(POFILE)
92*c5c4113dSnw
93*c5c4113dSnwinstall: all $(ROOTLIBPROG) $(ROOTMANIFEST)
94*c5c4113dSnw
95*c5c4113dSnwcheck: $(CHKMANIFEST)
96*c5c4113dSnw
97*c5c4113dSnwclean:
98*c5c4113dSnw	$(RM) $(OBJS)
99*c5c4113dSnw
100*c5c4113dSnwclobber:
101*c5c4113dSnw
102*c5c4113dSnwlint:   lint_SRCS
103*c5c4113dSnw
104*c5c4113dSnwlint_SRCS:
105*c5c4113dSnw
106*c5c4113dSnwinclude ../../Makefile.targ
107*c5c4113dSnw
108*c5c4113dSnwFRC:
109*c5c4113dSnw
110