xref: /titanic_44/usr/src/cmd/idmap/idmapd/Makefile (revision 1bdd6c0e3710e91cb1f31aa78de33cb638494480)
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 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26PROG =		idmapd
27MANIFEST =	idmap.xml
28SERVEROBJS =	idmapd.o init.o dbutils.o rpc_svc.o server.o adutils.o\
29	idmap_config.o nldaputils.o
30SERVERSRCS =	$(SERVEROBJS:%.o=%.c)
31OBJS =		$(SERVEROBJS)
32SRCS =		$(SERVERSRCS)
33POFILES =	$(OBJS:%.o=%.po)
34
35all :=		TARGET = all
36install :=	TARGET = install
37clean :=	TARGET = clean
38clobber :=	TARGET = clobber
39
40LIBSQLITE =	$(ROOT)/usr/lib/libsqlite.o
41SQLITELINT =	$(ROOT)/usr/lib/llib-lsqlite.ln
42
43include ../../Makefile.cmd
44
45POFILE =	$(PROG)_all.po
46
47ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
48$(ROOTMANIFEST) := FILEMODE= 444
49
50INCS += -I. -I../../../lib/libidmap/common\
51	 -I../../../lib/libsldap/common\
52	 -I../../../lib/libadutils/common
53
54$(OBJS) := CPPFLAGS += $(INCS) -D_REENTRANT
55$(POFILE) := CPPFLAGS += $(INCS)
56
57CFLAGS += -v
58LDLIBS += -lsecdb -lsocket -lnsl -lidmap -lscf -lsldap -lldap -luuid -ladutils
59
60$(PROG) := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
61$(PROG) := LDFLAGS += $(MAPFILES:%=-M%)
62
63DIRMODE = 0755
64FILEMODE = 0555
65OWNER = root
66GROUP = sys
67
68lint_SRCS := CPPFLAGS += $(INCS) -D_REENTRANT
69lint := LDLIBS += $(SQLITELINT)
70
71.KEEP_STATE:
72
73.PARALLEL: $(OBJS)
74
75all: $(PROG)
76
77$(PROG): $(OBJS) $$(MAPFILES)
78	$(LINK.c) -o $@ $(OBJS) $(LIBSQLITE) $(LDLIBS)
79	$(POST_PROCESS)
80
81$(POFILE): $(POFILES)
82	$(RM) $(POFILE)
83	cat $(POFILES) > $(POFILE)
84
85install: all $(ROOTLIBPROG) $(ROOTMANIFEST)
86
87check: $(CHKMANIFEST)
88
89clean:
90	$(RM) $(OBJS)
91
92clobber:
93
94lint:   lint_SRCS
95
96lint_SRCS:
97
98include ../../Makefile.targ
99
100FRC:
101
102