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. INSTALL_ROOT 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 = $(INSTALL_ROOT)$(exec_prefix)/bin
34 # Directory in which to install the .a or .so binary for the Neo library:
35 LIB_INSTALL_DIR = $(INSTALL_ROOT)$(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 = $(INSTALL_ROOT)$(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_BUILD = @ldapbuild@
92 #----------------------------------------------------------------
93 # The information below is modified by the configure script when
94 # Makefile is generated from Makefile.in. You shouldn't normally
95 # modify any of this stuff by hand.
96 #----------------------------------------------------------------
100 INSTALL_PROGRAM = @INSTALL_PROGRAM@
101 INSTALL_DATA = @INSTALL_DATA@
103 SRC_DIR = @srcdir@/..
104 TOP_DIR = @srcdir@/..
105 GENERIC_DIR = $(TOP_DIR)/generic
107 #----------------------------------------------------------------
108 # The information below should be usable as is. The configure
109 # script won't modify it and you shouldn't need to modify it
111 #----------------------------------------------------------------
116 LIBDIR=$(exec_prefix)/lib
117 INCDIR=$(prefix)/include
119 LIBS= @LIBS@ @TCLX_LIB_SPEC@ @TCL_LIB_SPEC@ @TCL_LIBS@ $(LDAP_LIBFLAGS) -lc
120 TK_LIBS=@TKX_LIB_SPEC@ @TK_LIB_SPEC@ @TK_LIBS@
121 TK_VERSION=@TK_VERSION@
123 LDAPINCDIR=/usr/local/include
126 CC_SWITCHES = ${CFLAGS} @NEO_SHLIB_CFLAGS@ -I. \
127 -I@prefix@/include ${AC_FLAGS} ${PROTO_FLAGS} \
128 ${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} \
129 -DNEO_LIBRARY=\"${NEO_LIBRARY}\"
131 TK_SWITCHES = ${CC_SWITCHES} @TK_XINCLUDES@
134 $(CC) -c $(CC_SWITCHES) $<
136 all: @NEO_LIB_FILE@ ldaptclsh @LDAPWISH@
138 @NEO_LIB_FILE@: $(OBJS)
141 $(RANLIB) @NEO_LIB_FILE@
143 neoXldap.o: neoXldap.c
144 $(CC) -c $(LDAP_CFLAGS) $(CC_SWITCHES) $<
147 -rm -f ldaptclsh ldapwish
151 rm -f Makefile pkgIndex.tcl config.cache config.log config.status
153 install: install-binaries install-man
155 install-binaries: @NEO_LIB_FILE@ ldaptclsh @LDAPWISH@
156 @-mkdir -p $(BIN_INSTALL_DIR)
157 $(INSTALL_PROGRAM) ldaptclsh $(BIN_INSTALL_DIR)/ldaptclsh
158 @if [ -n "@LDAPWISH@" ] ; then \
159 echo $(INSTALL_PROGRAM) ldapwish $(BIN_INSTALL_DIR)/ldapwish; \
160 $(INSTALL_PROGRAM) ldapwish $(BIN_INSTALL_DIR)/ldapwish; \
162 $(INSTALL_DATA) @NEO_LIB_FILE@ $(LIB_INSTALL_DIR)
163 @if [ "$(NEO_LIB_FILE)" = "$(NEO_SHARED_LIB_FILE)" ] ; then \
164 echo Installing pkgIndex.tcl in $(NEO_LIBRARY); \
165 mkdir -p $(NEO_LIBRARY); \
166 $(INSTALL_DATA) pkgIndex.tcl $(NEO_LIBRARY); \
173 echo "Installing $$i"; \
174 rm -f $(MANN_INSTALL_DIR)/$$i; \
175 sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
176 $$i > $(MANN_INSTALL_DIR)/$$i; \
177 chmod 444 $(MANN_INSTALL_DIR)/$$i; \
181 TCLOFILES= tclAppInit.o
183 ldaptclsh:$(TCLOFILES) @NEO_LIB_FILE@
184 $(CC) @LD_FLAGS@ $(TCLOFILES) @NEO_BUILD_LIB_SPEC@ $(LIBS) \
185 @TCL_LD_SEARCH_FLAGS@ -o ldaptclsh
187 tkAppInit.o: tkAppInit.c
188 $(CC) -c ${TK_SWITCHES} tkAppInit.c
190 ldapwish:tkAppInit.o @NEO_LIB_FILE@
191 $(CC) @LD_FLAGS@ tkAppInit.o @NEO_BUILD_LIB_SPEC@ $(TK_LIBS) $(LIBS) \
192 @TCL_LD_SEARCH_FLAGS@ -o ldapwish