summaryrefslogtreecommitdiffstats
path: root/contrib/ldaptcl/Makefile.in
blob: a66c7453d84db9b6d055c67c5f105320af7a96e7 (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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
#
# This file is a Makefile for Neo, the NeoSoft extensions to Tcl.
# If it has the name "Makefile.in" then it is a template for a
# Makefile;  to generate the actual Makefile, run "./configure",
# which is a configuration script generated by the "autoconf" program
# (constructs like "@foo@" will get replaced in the actual Makefile.
#

VERSION = @NEO_VERSION@
LIBNAME = @NEO_SHARED_LIB_FILE@

# Default top-level directories in which to install architecture-
# specific files (exec_prefix) and machine-independent files such
# as scripts (prefix).  The values specified here may be overridden
# at configure-time with the --exec-prefix and --prefix options
# to the "configure" script.

prefix =        @prefix@
exec_prefix =       @exec_prefix@

# The following definition can be set to non-null for special systems
# like AFS with replication.  It allows the pathnames used for installation
# to be different than those used for actually reference files at
# run-time.  DESTDIR is prepended to $prefix and $exec_prefix
# when installing files.
DESTDIR =

# Directory in which to search for tcl libraries
NEO_LIBRARY	= $(exec_prefix)/lib/ldaptcl$(VERSION)

# Directory in which to install the ldaptcl binary:
BIN_INSTALL_DIR = $(DESTDIR)$(exec_prefix)/bin

# Directory in which to install the .a or .so binary for the Neo library:
LIB_INSTALL_DIR = $(DESTDIR)$(exec_prefix)/lib

# Path to use at runtime to refer to LIB_INSTALL_DIR:
LIB_RUNTIME_DIR =	$(exec_prefix)/lib

# Top-level directory for man entries:
MANN_INSTALL_DIR =	$(DESTDIR)$(prefix)/man/mann


# The symbols below provide support for dynamic loading and shared
# libraries.  The values of the symbols are normally set by the
# configure script.  You shouldn't normally need to modify any of
# these definitions by hand.

SHLIB_CFLAGS = @NEO_SHLIB_CFLAGS@

NEO_LIB_FILE = @NEO_LIB_FILE@

NEO_SHARED_LIB_FILE = @NEO_SHARED_LIB_FILE@

# The directory containing the Tcl sources and headers appropriate
# for this version of Neo ("srcdir" will be replaced or has already
# been replaced by the configure script):
TCL_GENERIC_DIR =   @TCL_SRC_DIR@/generic

# The top of the TclX directory tree
TCLX_TOP_DIR	=	@TCLX_TOP_DIR@

# The directory where tclExtend.h will be:
TCLX_TCL_GEN_DIR =	${TCLX_TOP_DIR}/tcl/generic

# The directory where tclXunixPort.h will be:
TCLX_TCL_UNIX_DIR =	${TCLX_TOP_DIR}/tcl/unix

# The path to tclX the runtcl script:
TCLX_RUNTCL	=	${TCLX_TOP_DIR}/unix/runtcl

# The directory containing the Tcl library archive file appropriate
# for this version of Neo:
TCL_BIN_DIR =       @TCL_BIN_DIR@


# The symbol below provides support for dynamic loading and shared
# libraries.  See configure.in for a description of what it means.
# The values of the symbolis normally set by the configure script.

SHLIB_LD = @SHLIB_LD@

# Set to the options to include libldap.a and liblber.a 
# (eg. -L../tools/blah -lldap -llber)

LDAP_LIBFLAGS	= @ldaplibflags@
LDAP_CFLAGS	= @ldapinclude@
LDAP_INCDIR	= @ldapincdir@
LDAP_BUILD	= @ldapbuild@
LDAP_DIR	= @ldapdir@


#----------------------------------------------------------------
# The information below is modified by the configure script when
# Makefile is generated from Makefile.in.  You shouldn't normally
# modify any of this stuff by hand.
#----------------------------------------------------------------

AC_FLAGS =      @DEFS@
INSTALL=	@INSTALL@
INSTALL_PROGRAM =   @INSTALL_PROGRAM@
INSTALL_DATA =      @INSTALL_DATA@
RANLIB =        @RANLIB@
SRC_DIR =       @srcdir@/..
TOP_DIR =       @srcdir@/..
GENERIC_DIR =       $(TOP_DIR)/generic

#----------------------------------------------------------------
# The information below should be usable as is.  The configure
# script won't modify it and you shouldn't need to modify it
# either.
#----------------------------------------------------------------


OBJS= neoXldap.o

LIBDIR=$(exec_prefix)/lib
INCDIR=$(prefix)/include

LIBS= @LIBS@ @TCLX_LIB_SPEC@ @TCL_LIB_SPEC@ @TCL_LIBS@ $(LDAP_LIBFLAGS) -lc
TK_LIBS=@TKX_LIB_SPEC@ @TK_LIB_SPEC@ @TK_LIBS@
TK_VERSION=@TK_VERSION@

CC =        @CC@
CC_SWITCHES =   ${CFLAGS} @NEO_SHLIB_CFLAGS@ -I. \
-I@prefix@/include ${AC_FLAGS} ${PROTO_FLAGS} \
${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} \
-DNEO_LIBRARY=\"${NEO_LIBRARY}\" -DVERSION=\"${VERSION}\" 

TK_SWITCHES = ${CC_SWITCHES} @TK_XINCLUDES@

.c.o:
	$(CC) -c $(CC_SWITCHES) $<

all:	@NEO_LIB_FILE@ ldaptclsh @LDAPWISH@

@NEO_LIB_FILE@:	$(OBJS)
	rm -f @NEO_LIB_FILE@
	@MAKE_LIB@
	$(RANLIB) @NEO_LIB_FILE@

neoXldap.o: neoXldap.c ldaptclerr.h
	$(CC) -c $(LDAP_CFLAGS) $(CC_SWITCHES) neoXldap.c

ldaptclerr.h: ldaperr.tcl
	tcl ldaperr.tcl $(LDAP_INCDIR)/ldap.h > ldaptclerr.h


clean:
	-rm -f ldaptclsh ldapwish
	-rm -f *.o *.a *.so*

distclean: clean
	rm -f Makefile pkgIndex.tcl config.cache config.log config.status \
		ldaptclerr.h

install: install-binaries install-man

install-binaries: @NEO_LIB_FILE@ ldaptclsh @LDAPWISH@
	@-mkdir -p $(BIN_INSTALL_DIR)
	$(INSTALL_PROGRAM) ldaptclsh $(BIN_INSTALL_DIR)/ldaptclsh
	@if [ -n "@LDAPWISH@" ] ; then \
	    echo $(INSTALL_PROGRAM) ldapwish $(BIN_INSTALL_DIR)/ldapwish; \
	    $(INSTALL_PROGRAM) ldapwish $(BIN_INSTALL_DIR)/ldapwish; \
	fi
	$(INSTALL_DATA) @NEO_LIB_FILE@ $(LIB_INSTALL_DIR)
	@if [ "$(NEO_LIB_FILE)" = "$(NEO_SHARED_LIB_FILE)" ] ; then \
		echo Installing pkgIndex.tcl in $(NEO_LIBRARY); \
		mkdir -p $(NEO_LIBRARY); \
		$(INSTALL_DATA) pkgIndex.tcl $(NEO_LIBRARY); \
	fi


install-man:
	@for i in ldap.n; \
	    do \
	    echo "Installing $$i"; \
	    rm -f $(MANN_INSTALL_DIR)/$$i; \
	    sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
		    $$i > $(MANN_INSTALL_DIR)/$$i; \
	    chmod 444 $(MANN_INSTALL_DIR)/$$i; \
	done;


TCLOFILES= tclAppInit.o

ldaptclsh:$(TCLOFILES) @NEO_LIB_FILE@
	$(CC) @LD_FLAGS@ $(TCLOFILES) @NEO_BUILD_LIB_SPEC@ $(LIBS) \
	@TCL_LD_SEARCH_FLAGS@ -o ldaptclsh

tkAppInit.o: tkAppInit.c
	$(CC) -c ${TK_SWITCHES} tkAppInit.c

ldapwish:tkAppInit.o @NEO_LIB_FILE@
	$(CC) @LD_FLAGS@ tkAppInit.o @NEO_BUILD_LIB_SPEC@ $(TK_LIBS) $(LIBS) \
	@TCL_LD_SEARCH_FLAGS@ -o ldapwish