1c5c4113dSnw141292# 2c5c4113dSnw141292# CDDL HEADER START 3c5c4113dSnw141292# 4c5c4113dSnw141292# The contents of this file are subject to the terms of the 5c5c4113dSnw141292# Common Development and Distribution License (the "License"). 6c5c4113dSnw141292# You may not use this file except in compliance with the License. 7c5c4113dSnw141292# 8c5c4113dSnw141292# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9c5c4113dSnw141292# or http://www.opensolaris.org/os/licensing. 10c5c4113dSnw141292# See the License for the specific language governing permissions 11c5c4113dSnw141292# and limitations under the License. 12c5c4113dSnw141292# 13c5c4113dSnw141292# When distributing Covered Code, include this CDDL HEADER in each 14c5c4113dSnw141292# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15c5c4113dSnw141292# If applicable, add the following below this CDDL HEADER, with the 16c5c4113dSnw141292# fields enclosed by brackets "[]" replaced with your own identifying 17c5c4113dSnw141292# information: Portions Copyright [yyyy] [name of copyright owner] 18c5c4113dSnw141292# 19c5c4113dSnw141292# CDDL HEADER END 20c5c4113dSnw141292# 21c5c4113dSnw141292# 22148c5f43SAlan Wright# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. 23b3700b07SGordon Ross# Copyright 2014 Nexenta Systems, Inc. All rights reserved. 24c5c4113dSnw141292# 255661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc. 26*3cd6e9e1SMatt Barden# Copyright 2022-2023 RackTop Systems, Inc. 27c5c4113dSnw141292 28c5c4113dSnw141292PROG = idmapd 29c5c4113dSnw141292MANIFEST = idmap.xml 301fcced4cSJordan BrownSERVEROBJS = \ 31b3700b07SGordon Ross adspriv_impl.o \ 321fcced4cSJordan Brown directory_provider_builtin.o \ 331fcced4cSJordan Brown directory_provider_nsswitch.o \ 341fcced4cSJordan Brown directory_provider_ad.o \ 351fcced4cSJordan Brown directory_server.o \ 361fcced4cSJordan Brown adutils.o \ 371fcced4cSJordan Brown dbutils.o \ 381fcced4cSJordan Brown idmap_config.o \ 391fcced4cSJordan Brown idmapd.o \ 401fcced4cSJordan Brown init.o \ 41148c5f43SAlan Wright idmap_lsa.o \ 42b3700b07SGordon Ross krb5_lookup.o \ 431fcced4cSJordan Brown nldaputils.o \ 441fcced4cSJordan Brown server.o \ 451fcced4cSJordan Brown wksids.o 461fcced4cSJordan Brown 47b3700b07SGordon RossGENOBJS = \ 48b3700b07SGordon Ross adspriv_srv.o \ 49b3700b07SGordon Ross rpc_svc.o 50b3700b07SGordon Ross 51c5c4113dSnw141292SERVERSRCS = $(SERVEROBJS:%.o=%.c) 52b3700b07SGordon RossGENSRCS = $(GENOBJS:%.o=%.c) 53b3700b07SGordon RossOBJS = $(SERVEROBJS) $(GENOBJS) 54c5c4113dSnw141292SRCS = $(SERVERSRCS) 55c5c4113dSnw141292POFILES = $(OBJS:%.o=%.po) 56c5c4113dSnw141292 57c5c4113dSnw141292all := TARGET = all 58c5c4113dSnw141292install := TARGET = install 59c5c4113dSnw141292clean := TARGET = clean 60c5c4113dSnw141292clobber := TARGET = clobber 61c5c4113dSnw141292 62c5c4113dSnw141292include ../../Makefile.cmd 63e3d9e7f3SGordon Rossinclude ../../Makefile.ctf 64c5c4113dSnw141292 657014882cSRichard LoweCERRWARN += -_gcc=-Wno-type-limits 667014882cSRichard LoweCERRWARN += -_gcc=-Wno-switch 67d3b5f563SJohn LevonCERRWARN += $(CNOWARN_UNINIT) 687014882cSRichard Lowe 695661bb76SJohn Levon# not linted 705661bb76SJohn LevonSMATCH=off 715661bb76SJohn Levon 721fcced4cSJordan BrownTEXT_DOMAIN = SUNW_OST_OSLIB 731fcced4cSJordan BrownXGETTEXT = $(GNUXGETTEXT) 741fcced4cSJordan BrownXGETFLAGS = --foreign-user --strict -n -E --width=72 \ 751fcced4cSJordan Brown --omit-header --keyword=directoryError:2 \ 761fcced4cSJordan Brown --language=C --force-po 771fcced4cSJordan Brown 78bd0ce624SYuri PankovCSTD = $(CSTD_GNU99) 79c5c4113dSnw141292POFILE = $(PROG)_all.po 80c5c4113dSnw141292 811fcced4cSJordan BrownRPC_MSGOUT_OPT = -DRPC_MSGOUT=idmap_rpc_msgout 821fcced4cSJordan Brown 83c5c4113dSnw141292ROOTMANIFESTDIR = $(ROOTSVCSYSTEM) 84c5c4113dSnw141292$(ROOTMANIFEST) := FILEMODE= 444 85b3700b07SGordon RossRPCSVC= ../../../uts/common/rpcsvc 86b3700b07SGordon RossADS_CMN=../../../lib/libads/common 87c5c4113dSnw141292 889b214d32SJordan BrownINCS += -I. -I../../../lib/libidmap/common \ 892b4a7802SBaban Kenkre -I../../../lib/libsldap/common \ 90148c5f43SAlan Wright -I../../../lib/libadutils/common \ 91b3700b07SGordon Ross -I $(ADS_CMN) \ 92148c5f43SAlan Wright -I../../../lib/smbsrv/libsmb/common 93c5c4113dSnw141292 94b3700b07SGordon Ross# Should not have to do this, but the Kerberos includes are a mess. 95b3700b07SGordon RossINCS += -I $(ROOT)/usr/include/kerberosv5 96b3700b07SGordon Ross 97c5c4113dSnw141292$(OBJS) := CPPFLAGS += $(INCS) -D_REENTRANT 98c5c4113dSnw141292$(POFILE) := CPPFLAGS += $(INCS) 99c5c4113dSnw141292 1007014882cSRichard LoweCFLAGS += $(CCVERBOSE) 101*3cd6e9e1SMatt Barden$(NOT_RELEASE_BUILD)CPPFLAGS += -DIDMAPD_DEBUG 102*3cd6e9e1SMatt Barden 10391d7f85eSGordon RossLDLIBS += \ 10491d7f85eSGordon Ross -lsqlite-sys \ 10591d7f85eSGordon Ross -lsecdb \ 1061fcced4cSJordan Brown -lsocket \ 1071fcced4cSJordan Brown -lnsl \ 1081fcced4cSJordan Brown -lidmap \ 1091fcced4cSJordan Brown -lscf \ 1101fcced4cSJordan Brown -lsldap \ 1111fcced4cSJordan Brown -lldap \ 1121fcced4cSJordan Brown -luuid \ 1131fcced4cSJordan Brown -ladutils \ 114b3700b07SGordon Ross -lads \ 115148c5f43SAlan Wright -lumem \ 116148c5f43SAlan Wright -lnvpair \ 117cb174861Sjoyce mcintosh -luutil \ 118148c5f43SAlan Wright -L $(ROOT)/usr/lib/smbsrv \ 119148c5f43SAlan Wright -lsmb 1201fcced4cSJordan Brown 1211fcced4cSJordan Brownrpc_svc.o := CFLAGS += $(RPC_MSGOUT_OPT) 122c5c4113dSnw141292 123*3cd6e9e1SMatt BardenLDFLAGS += -R /usr/lib/smbsrv 124c5c4113dSnw141292 125c5c4113dSnw141292DIRMODE = 0755 126c5c4113dSnw141292FILEMODE = 0555 127c5c4113dSnw141292 128c5c4113dSnw141292.KEEP_STATE: 129c5c4113dSnw141292 130c5c4113dSnw141292.PARALLEL: $(OBJS) 131c5c4113dSnw141292 132c5c4113dSnw141292all: $(PROG) 133c5c4113dSnw141292 134*3cd6e9e1SMatt Barden$(PROG): $(OBJS) 13591d7f85eSGordon Ross $(LINK.c) -o $@ $(OBJS) $(LDLIBS) 136c5c4113dSnw141292 $(POST_PROCESS) 137c5c4113dSnw141292 138c5c4113dSnw141292$(POFILE): $(POFILES) 139c5c4113dSnw141292 $(RM) $(POFILE) 140c5c4113dSnw141292 cat $(POFILES) > $(POFILE) 141c5c4113dSnw141292 142c5c4113dSnw141292install: all $(ROOTLIBPROG) $(ROOTMANIFEST) 143c5c4113dSnw141292 144c5c4113dSnw141292check: $(CHKMANIFEST) 145c5c4113dSnw141292 146c5c4113dSnw141292clean: 147b3700b07SGordon Ross $(RM) $(OBJS) $(GENSRCS) 148c5c4113dSnw141292 149b3700b07SGordon RossRPCGENFLAGS = -CMN 150b3700b07SGordon Ross 151b3700b07SGordon Rossadspriv_srv.o : adspriv_srv.c 152b3700b07SGordon Ross 153b3700b07SGordon Rossadspriv_srv.c: 154b3700b07SGordon Ross $(RPCGEN) $(RPCGENFLAGS) -m $(ADS_CMN)/ads_priv.x > $@ 155b3700b07SGordon Ross 156b3700b07SGordon Rossrpc_svc.o : rpc_svc.c 157b3700b07SGordon Ross 158b3700b07SGordon Rossrpc_svc.c : $(RPCSVC)/idmap_prot.x 159b3700b07SGordon Ross $(RPCGEN) $(RPCGENFLAGS) -m $(RPCSVC)/idmap_prot.x > $@ 160b3700b07SGordon Ross 161c5c4113dSnw141292include ../../Makefile.targ 162