summaryrefslogtreecommitdiff
path: root/usr/src/lib/libldap5/Makefile.com
blob: ee48739eea25e4d68c20ebc192f995ce05e626e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#

LIBRARY= libldap.a
VERS= .5

# Definition of all the objects macros
# The LDAP specific objects

BEROBJS=	bprint.o	decode.o 	encode.o       io.o

LDAPOBJS=  abandon.o add.o bind.o cache.o charray.o \
        charset.o compare.o compat.o control.o countvalues.o \
        delete.o disptmpl.o dsparse.o error.o extendop.o free.o freevalues.o \
        friendly.o getattr.o getdn.o getdxbyname.o getentry.o \
        getfilter.o getoption.o getvalues.o memcache.o message.o \
        modify.o open.o os-ip.o proxyauthctrl.o psearch.o referral.o \
        rename.o request.o reslist.o result.o saslbind.o sasl.o \
        sbind.o search.o setoption.o sort.o sortctrl.o srchpref.o \
        tmplout.o ufn.o unbind.o unescape.o url.o ldaputf8.o vlistctrl.o \
        cram_md5.o secutil.o spagectrl.o digest_md5.o

SSLDAPOBJS=	clientinit.o ldapsinit.o errormap.o

PRLDAPOBJS=	ldappr-dns.o	ldappr-error.o	ldappr-public.o \
		ldappr-io.o	ldappr-threads.o

UTILOBJS= log.o line64.o

# Grouping it all together
OBJECTS=	$(BEROBJS) $(LDAPOBJS) $(SSLDAPOBJS) $(PRLDAPOBJS) \
		$(UTILOBJS)

# include library definitions
include ../../Makefile.lib

NSS_LIBS=	-lnspr4 -lplc4 -lnss3 -lssl3
NSS_HDRS=	$(ADJUNCT_PROTO)/usr/include/mps
NSS_LDPATH=	/usr/lib/mps
NSS_LDPATH64=	$(NSS_LDPATH)/64	


LDAP_FLAGS=     -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS \
                -D_SOLARIS_SDK \
                -DUSE_WAITPID -DNEEDPROTOS \
                -DNET_SSL  -DNO_LIBLCACHE -DLDAP_REFERRALS \
                -DNS_DOMESTIC -DLDAP_SSLIO_HOOKS -DSTR_TRANSLATION \
                -DLDAP_SASLIO_HOOKS


# Include directories for all files
COM_INC=	-I$(SRC)/lib/libldap5/include/ldap \
		-I$(NSS_HDRS)

SRCS=		$(BEROBJS:%.o=../sources/ldap/ber/%.c) \
		$(LDAPOBJS:%.o=../sources/ldap/common/%.c) \
		$(SSLDAPOBJS:%.o=../sources/ldap/ssldap/%.c) \
		$(PRLDAPOBJS:%.o=../sources/ldap/prldap/%.c) \
		$(UTILOBJS:%.o=../sources/ldap/util/%.c)

LIBS =		$(DYNLIB) $(LINTLIB)
DYNFLAGS +=	$(ZNODELETE)

CPPFLAGS=	$(COM_INC) $(CPPFLAGS.master)

# definitions for lint

$(LINTLIB):= 	SRCS=../sources/ldap/common/llib-lldap
$(LINTLIB):= 	LINTFLAGS=-nvx 
$(LINTLIB):= 	TARGET_ARCH=

LINTOUT=	lint.out

LINTSRC=	$(LINTLIB:%.ln=%)
ROOTLINTDIR=	$(ROOTLIBDIR)
ROOTLINT=	$(LINTSRC:%=$(ROOTLINTDIR)/%)


CLEANFILES += 	$(LINTOUT) $(LINTLIB)

# Local Libldap definitions
LOCFLAGS +=	 $(XSTRCONST) -D_REENTRANT

# Following values defined in Makefile.master are overwritten here.
#sparc_C_PICFLAGS =	$(sparc_C_BIGPICFLAGS)
sparcv9_C_PICFLAGS =	$(sparcv9_C_BIGPICFLAGS)
#i386_C_PICFLAGS =	$(i386_C_BIGPICFLAGS)
#amd64_C_PICFLAGS =	$(amd64_C_BIGPICFLAGS)

CFLAGS +=	$(CCVERBOSE) $(LOCFLAGS)
CFLAGS64 +=	$(LOCFLAGS)

CERRWARN +=	-_gcc=-Wno-parentheses
CERRWARN +=	-_gcc=-Wno-uninitialized
CERRWARN +=	-_gcc=-Wno-type-limits
CERRWARN +=	-_gcc=-Wno-unused-function
CERRWARN +=	-_gcc=-Wno-unused-variable
CERRWARN +=	-_gcc=-Wno-unused-value
CERRWARN +=	-_gcc=-Wno-address

LDLIBS +=	-lsasl -lsocket -lnsl -lmd -lc

.KEEP_STATE:

# include library targets
include ../../Makefile.targ

pics/%.o: ../sources/ldap/ber/%.c
	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -o $@ $<
	$(POST_PROCESS_O)

pics/%.o: ../sources/ldap/common/%.c
	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -o $@ $<
	$(POST_PROCESS_O)

pics/%.o: ../sources/ldap/ssldap/%.c
	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $<
	$(POST_PROCESS_O)

pics/%.o: ../sources/ldap/prldap/%.c
	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $<
	$(POST_PROCESS_O)

pics/%.o: ../sources/ldap/util/%.c
	$(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $<
	$(POST_PROCESS_O)

# install rule for lint library target
$(ROOTLINTDIR)/%: ../sources/ldap/common/%
	$(INS.file)