2 # This file is a Makefile for Neo, the NeoSoft extensions to Tcl.
3 # If it has the name "Makefile.in" then it is a template for a
4 # Makefile; to generate the actual Makefile, run "./configure",
5 # which is a configuration script generated by the "autoconf" program
6 # (constructs like "@foo@" will get replaced in the actual Makefile.
9 VERSION = @NEO_VERSION@
10 LIBNAME = @NEO_SHARED_LIB_FILE@
12 # Default top-level directories in which to install architecture-
13 # specific files (exec_prefix) and machine-independent files such
14 # as scripts (prefix). The values specified here may be overridden
15 # at configure-time with the --exec-prefix and --prefix options
16 # to the "configure" script.
19 exec_prefix = @exec_prefix@
21 # The following definition can be set to non-null for special systems
22 # like AFS with replication. It allows the pathnames used for installation
23 # to be different than those used for actually reference files at
24 # run-time. DESTDIR is prepended to $prefix and $exec_prefix
25 # when installing files.
28 # Directory in which to search for tcl libraries
29 NEO_LIBRARY = $(exec_prefix)/lib/ldaptcl$(VERSION)
31 # Directory in which to install the ldaptcl binary:
32 BIN_INSTALL_DIR = $(DESTDIR)$(exec_prefix)/bin
34 # Directory in which to install the .a or .so binary for the Neo library:
35 LIB_INSTALL_DIR = $(DESTDIR)$(exec_prefix)/lib
37 # Path to use at runtime to refer to LIB_INSTALL_DIR:
38 LIB_RUNTIME_DIR = $(exec_prefix)/lib
40 # Top-level directory for man entries:
41 MANN_INSTALL_DIR = $(DESTDIR)$(prefix)/man/mann
44 # The symbols below provide support for dynamic loading and shared
45 # libraries. The values of the symbols are normally set by the
46 # configure script. You shouldn't normally need to modify any of
47 # these definitions by hand.
49 SHLIB_CFLAGS = @NEO_SHLIB_CFLAGS@
51 NEO_LIB_FILE = @NEO_LIB_FILE@
53 NEO_SHARED_LIB_FILE = @NEO_SHARED_LIB_FILE@
55 # The directory containing the Tcl sources and headers appropriate
56 # for this version of Neo ("srcdir" will be replaced or has already
57 # been replaced by the configure script):
58 TCL_GENERIC_DIR = @TCL_SRC_DIR@/generic
60 # The top of the TclX directory tree
61 TCLX_TOP_DIR = @TCLX_TOP_DIR@
63 # The directory where tclExtend.h will be:
64 TCLX_TCL_GEN_DIR = ${TCLX_TOP_DIR}/tcl/generic
66 # The directory where tclXunixPort.h will be:
67 TCLX_TCL_UNIX_DIR = ${TCLX_TOP_DIR}/tcl/unix
69 # The path to tclX the runtcl script:
70 TCLX_RUNTCL = ${TCLX_TOP_DIR}/unix/runtcl
72 # The directory containing the Tcl library archive file appropriate
73 # for this version of Neo:
74 TCL_BIN_DIR = @TCL_BIN_DIR@
77 # The symbol below provides support for dynamic loading and shared
78 # libraries. See configure.in for a description of what it means.
79 # The values of the symbolis normally set by the configure script.
83 # Set to the options to include libldap.a and liblber.a
84 # (eg. -L../tools/blah -lldap -llber)
86 LDAP_LIBFLAGS = @ldaplibflags@
87 LDAP_CFLAGS = @ldapinclude@
88 LDAP_INCDIR = @ldapincdir@
89 LDAP_BUILD = @ldapbuild@
93 #----------------------------------------------------------------
94 # The information below is modified by the configure script when
95 # Makefile is generated from Makefile.in. You shouldn't normally
96 # modify any of this stuff by hand.
97 #----------------------------------------------------------------
101 INSTALL_PROGRAM = @INSTALL_PROGRAM@
102 INSTALL_DATA = @INSTALL_DATA@
104 SRC_DIR = @srcdir@/..
105 TOP_DIR = @srcdir@/..
106 GENERIC_DIR = $(TOP_DIR)/generic
108 #----------------------------------------------------------------
109 # The information below should be usable as is. The configure
110 # script won't modify it and you shouldn't need to modify it
112 #----------------------------------------------------------------
117 LIBDIR=$(exec_prefix)/lib
118 INCDIR=$(prefix)/include
120 LIBS= @LIBS@ @TCLX_LIB_SPEC@ @TCL_LIB_SPEC@ @TCL_LIBS@ $(LDAP_LIBFLAGS) -lc
121 TK_LIBS=@TKX_LIB_SPEC@ @TK_LIB_SPEC@ @TK_LIBS@
122 TK_VERSION=@TK_VERSION@
125 CC_SWITCHES = ${CFLAGS} @NEO_SHLIB_CFLAGS@ -I. \
126 -I@prefix@/include ${AC_FLAGS} ${PROTO_FLAGS} \
127 ${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} \
128 -DNEO_LIBRARY=\"${NEO_LIBRARY}\" -DVERSION=\"${VERSION}\"
130 TK_SWITCHES = ${CC_SWITCHES} @TK_XINCLUDES@
133 $(CC) -c $(CC_SWITCHES) $<
135 all: @NEO_LIB_FILE@ ldaptclsh @LDAPWISH@
137 @NEO_LIB_FILE@: $(OBJS)
140 $(RANLIB) @NEO_LIB_FILE@
142 neoXldap.o: neoXldap.c ldaptclerr.h
143 $(CC) -c $(LDAP_CFLAGS) $(CC_SWITCHES) $<
145 ldaptclerr.h: ldaperr.tcl
146 tcl ldaperr.tcl $(LDAP_INCDIR)/ldap.h > ldaptclerr.h
150 -rm -f ldaptclsh ldapwish
154 rm -f Makefile pkgIndex.tcl config.cache config.log config.status \
157 install: install-binaries install-man
159 install-binaries: @NEO_LIB_FILE@ ldaptclsh @LDAPWISH@
160 @-mkdir -p $(BIN_INSTALL_DIR)
161 $(INSTALL_PROGRAM) ldaptclsh $(BIN_INSTALL_DIR)/ldaptclsh
162 @if [ -n "@LDAPWISH@" ] ; then \
163 echo $(INSTALL_PROGRAM) ldapwish $(BIN_INSTALL_DIR)/ldapwish; \
164 $(INSTALL_PROGRAM) ldapwish $(BIN_INSTALL_DIR)/ldapwish; \
166 $(INSTALL_DATA) @NEO_LIB_FILE@ $(LIB_INSTALL_DIR)
167 @if [ "$(NEO_LIB_FILE)" = "$(NEO_SHARED_LIB_FILE)" ] ; then \
168 echo Installing pkgIndex.tcl in $(NEO_LIBRARY); \
169 mkdir -p $(NEO_LIBRARY); \
170 $(INSTALL_DATA) pkgIndex.tcl $(NEO_LIBRARY); \
177 echo "Installing $$i"; \
178 rm -f $(MANN_INSTALL_DIR)/$$i; \
179 sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
180 $$i > $(MANN_INSTALL_DIR)/$$i; \
181 chmod 444 $(MANN_INSTALL_DIR)/$$i; \
185 TCLOFILES= tclAppInit.o
187 ldaptclsh:$(TCLOFILES) @NEO_LIB_FILE@
188 $(CC) @LD_FLAGS@ $(TCLOFILES) @NEO_BUILD_LIB_SPEC@ $(LIBS) \
189 @TCL_LD_SEARCH_FLAGS@ -o ldaptclsh
191 tkAppInit.o: tkAppInit.c
192 $(CC) -c ${TK_SWITCHES} tkAppInit.c
194 ldapwish:tkAppInit.o @NEO_LIB_FILE@
195 $(CC) @LD_FLAGS@ tkAppInit.o @NEO_BUILD_LIB_SPEC@ $(TK_LIBS) $(LIBS) \
196 @TCL_LD_SEARCH_FLAGS@ -o ldapwish