Home | History | Annotate | Download | only in idmapd
      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 
     26 PROG =		idmapd
     27 MANIFEST =	idmap.xml
     28 SERVEROBJS =				\
     29 	directory_provider_builtin.o	\
     30 	directory_provider_nsswitch.o	\
     31 	directory_provider_ad.o		\
     32 	directory_server.o		\
     33 	adutils.o			\
     34 	dbutils.o			\
     35 	idmap_config.o			\
     36 	idmapd.o			\
     37 	init.o				\
     38 	nldaputils.o			\
     39 	rpc_svc.o			\
     40 	server.o			\
     41 	wksids.o
     42 
     43 SERVERSRCS =	$(SERVEROBJS:%.o=%.c)
     44 OBJS =		$(SERVEROBJS)
     45 SRCS =		$(SERVERSRCS)
     46 POFILES =	$(OBJS:%.o=%.po)
     47 
     48 all :=		TARGET = all
     49 install :=	TARGET = install
     50 clean :=	TARGET = clean
     51 clobber :=	TARGET = clobber
     52 
     53 LIBSQLITE =	$(ROOT)/usr/lib/libsqlite.o
     54 SQLITELINT =	$(ROOT)/usr/lib/llib-lsqlite.ln
     55 
     56 include ../../Makefile.cmd
     57 
     58 TEXT_DOMAIN =	SUNW_OST_OSLIB
     59 XGETTEXT =	$(GNUXGETTEXT)
     60 XGETFLAGS =	--foreign-user --strict -n -E --width=72 \
     61 		--omit-header --keyword=directoryError:2 \
     62 		--language=C --force-po
     63 
     64 C99MODE = $(C99_ENABLE)
     65 POFILE =	$(PROG)_all.po
     66 
     67 RPC_MSGOUT_OPT = -DRPC_MSGOUT=idmap_rpc_msgout
     68 
     69 ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
     70 $(ROOTMANIFEST) := FILEMODE= 444
     71 
     72 INCS += -I. -I../../../lib/libidmap/common\
     73 	 -I../../../lib/libsldap/common\
     74 	 -I../../../lib/libadutils/common
     75 
     76 $(OBJS) := CPPFLAGS += $(INCS) -D_REENTRANT
     77 $(POFILE) := CPPFLAGS += $(INCS)
     78 
     79 CFLAGS += -v
     80 LDLIBS += -lsecdb \
     81 	-lsocket \
     82 	-lnsl \
     83 	-lidmap \
     84 	-lscf \
     85 	-lsldap \
     86 	-lldap \
     87 	-luuid \
     88 	-ladutils \
     89 	-lumem
     90 
     91 rpc_svc.o := CFLAGS += $(RPC_MSGOUT_OPT)
     92 
     93 $(PROG) := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
     94 $(PROG) := LDFLAGS += $(MAPFILES:%=-M%)
     95 
     96 DIRMODE = 0755
     97 FILEMODE = 0555
     98 
     99 lint_SRCS := CPPFLAGS += $(INCS) -D_REENTRANT $(RPC_MSGOUT_OPT)
    100 lint := LDLIBS += $(SQLITELINT)
    101 
    102 .KEEP_STATE:
    103 
    104 .PARALLEL: $(OBJS)
    105 
    106 all: $(PROG)
    107 
    108 $(PROG): $(OBJS) $$(MAPFILES)
    109 	$(LINK.c) -o $@ $(OBJS) $(LIBSQLITE) $(LDLIBS)
    110 	$(POST_PROCESS)
    111 
    112 $(POFILE): $(POFILES)
    113 	$(RM) $(POFILE)
    114 	cat $(POFILES) > $(POFILE)
    115 
    116 install: all $(ROOTLIBPROG) $(ROOTMANIFEST)
    117 
    118 check: $(CHKMANIFEST)
    119 
    120 clean:
    121 	$(RM) $(OBJS)
    122 
    123 clobber:
    124 
    125 lint:   lint_SRCS
    126 
    127 lint_SRCS:
    128 
    129 include ../../Makefile.targ
    130 
    131 FRC:
    132 
    133