Changes between Version 66 and Version 67 of Projects/OpenLDAP


Ignore:
Timestamp:
Jul 6, 2012, 11:38:14 PM (7 years ago)
Author:
C Rempel
Comment:

/* Makefile.openldap */

Legend:

Unmodified
Added
Removed
Modified
  • Projects/OpenLDAP

    v66 v67  
    162162   $ git clone git://git.openldap.org/openldap.git openldap
    163163   $ cd openldap
     164
     165To make the slapd binary "relocatable", I turned the program into a library.  Unfortuneately, when I did that, the convienience libraries were no longer included.  However, I will walk through the process of turning an executable into a library...
     166
     167First, I modified the openldap/servers/slapd/Makefile.in to build a library.
     168   PROGRAMS = ...
     169 + LIBRARY = libslapd.a
     170   XPROGRAMS = ...
     171
     172Second, I commented out the original openldap/servers/slapd/Makefile.in  libslapd.a: Makefile target, as that was designed for a Windows host.
     173
     174 ! # libslapd.a: symdummy.o
     175 ! #     dlltool ...
     176
     177Third, I added a openldap/servers/slapd/Makefile.in libslapd.a: target by "cutting and pasting" the sources from the slapd: Makefile target, and using ar to build the library, and getting the ar flags from my target.cfg.  The linked objects were taken from the slapd: Makefile target.  Note: $@ means libslapd.a
     178
     179 + libslapd.a: $(SLAPD_DEPENDS) @LIBSLAPI@
     180 +       $(AR) ruv $@ $(SLAPD_OBJECTS) $(LIB) $(WRAP_LIBS)
     181
     182Fourth, I added an install-local Makefile target to the install-local-srv.
     183
     184 ! install-local-srv: install-slapd ... \
     185         install-conf ... install-local
     186Fifth, I added the install-local Makefile target.  I was inspired by openldap/libraries/liblutil/Makefile.in and openldap/include/Makefile.in.
     187I not onlu have libslapi.a installed, but main.h, which is needed to call main from my test.
     188 + install-local: FORCE $(LIBRARY)
     189 +       -$(MKDIR) $(DESTDIR)$(libdir)
     190 +       $(LTINSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(DESTDIR)$(libdir)
     191 +       $(LTFINISH) $(DESTDIR)$(libdir)
     192 +       -$(MKDIR) $(DESTDIR)$(includedir)
     193 +       for header in $(srcdir)/main.h ; \
     194 +       do \
     195 +               $(INSTALL) $(INSTALLFLAGS)  -m 644 $$header $(DESTDIR)$(includedir); \
     196 +       done
     197 +
    164198   $ make -f RTEMS_Makefiles/Makefile.openldap
    165199