summaryrefslogtreecommitdiffstats
path: root/ldap/servers/plugins/roles/Makefile
blob: 2e936fadb27e857fadbae70cf7f4d6c0383b8918 (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
#
# BEGIN COPYRIGHT BLOCK
# Copyright 2001 Sun Microsystems, Inc.
# Portions copyright 1999, 2001-2003 Netscape Communications Corporation.
# All rights reserved.
# END COPYRIGHT BLOCK
#
LDAP_SRC = ../../..
MCOM_ROOT = ../../../../..

NOSTDCLEAN=true # don't let nsconfig.mk define target clean
NOSTDSTRIP=true # don't let nsconfig.mk define target strip
NSPR20=true	# probably should be defined somewhere else (not sure where)

OBJDEST = $(OBJDIR)/lib/libroles
LIBDIR = $(LIB_RELDIR)
ifndef INSTDIR
INSTDIR = c:/netscape/server4/
endif

include $(MCOM_ROOT)/ldapserver/nsdefs.mk
include $(MCOM_ROOT)/ldapserver/nsconfig.mk
include $(LDAP_SRC)/nsldap.mk

ifeq ($(ARCH), WINNT)
DEF_FILE:=./roles.def
endif

ROLES_OBJS = roles_plugin.o roles_cache.o
OBJS = $(addprefix $(OBJDEST)/, $(ROLES_OBJS)) 

ROLES_DLL = roles-plugin

INCLUDES += -I../../slapd  -I../../../include
CFLAGS+=$(SLCFLAGS) -DSLAPD_LOGGING

# DBDB this is clearly all nonsense: the libraries this thing links with should not depend on the platform.
# However, for now I make this AIX-specific change and leave the NT-specifc stuff in place (I think it came
# from the makefile I copied to make this one. After build 3, fix this.

ifeq ($(ARCH), WINNT)
EXTRA_LIBS_DEP +=   $(LIBSLAPD)
EXTRA_LIBS += $(NSPRLINK)  $(LIBSLAPD) $(LDAP_LIBAVL)
endif

ifeq ($(ARCH), HPUX)
EXTRA_LIBS_DEP += $(LIBSLAPD_DEP) $(LDAPSDK_DEP) $(NSPR_DEP) $(SECURITY_DEP)
EXTRA_LIBS += $(DYN_NSHTTPD) $(ADMINUTIL_LINK) $(LDAPLINK) $(SECURITYLINK) $(NSPRLINK) $(ICULINK)
endif

ifeq ($(ARCH), WINNT)
ROLES_DLL_OBJ = $(addprefix $(OBJDEST)/, dllmain.o)
endif

ifeq ($(ARCH), AIX)
LD=ld
EXTRA_LIBS += $(NSPRLINK) $(LIBSLAPD) $(LDAP_LIBAVL)
endif

ROLES=	$(addprefix $(LIBDIR)/, $(ROLES_DLL).$(DLL_SUFFIX))

clientSDK: 

all:	$(OBJDEST) $(LIBDIR) $(ROLES)

ifeq ($(ARCH), WINNT)
$(ROLES): $(OBJS) $(ROLES_DLL_OBJ) $(DEF_FILE)
	$(LINK_DLL) $(ROLES_DLL_OBJ) $(EXTRA_LIBS) /DEF:$(DEF_FILE)
else
$(ROLES): $(OBJS) $(ROLES_DLL_OBJ) 
	$(LINK_DLL) $(ROLES_DLL_OBJ) $(EXTRA_LIBS)
endif


veryclean: clean

clean:
	$(RM) $(OBJS)
ifeq ($(ARCH), WINNT)
	$(RM) $(ROLES_DLL_OBJ)
endif
	$(RM) $(ROLES)

$(OBJDEST):
	$(MKDIR) $(OBJDEST)

$(LIBDIR):
	$(MKDIR) $(LIBDIR)

# Target to push the built binary to an installed server
#ROLES_PUSH = $(addprefix $(INSTDIR)lib/, $(notdir $(ROLES)))
#push: $(ROLES_PUSH)

#$(ROLES_PUSH): $(ROLES)
#	cp $(ROLES) $(ROLES_PUSH)