]> git.sur5r.net Git - openldap/commitdiff
Use new macros from configure.in to accomodate NT/Mingw32 environment.
authorHoward Chu <hyc@openldap.org>
Thu, 28 Oct 1999 07:31:59 +0000 (07:31 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 28 Oct 1999 07:31:59 +0000 (07:31 +0000)
See README 1.27 log

19 files changed:
build/lib-shared.mk
build/lib.mk
build/mod.mk
build/rules.mk
build/srv.mk
build/top.mk
clients/fax500/Makefile.in
clients/finger/Makefile.in
clients/gopher/Makefile.in
clients/mail500/Makefile.in
clients/rcpt500/Makefile.in
clients/tools/Makefile.in
clients/ud/Makefile.in
libraries/liblber/Makefile.in
libraries/libldap/Makefile.in
libraries/libldap_r/Makefile.in
libraries/liblutil/Makefile.in
servers/slurpd/Makefile.in
tests/progs/Makefile.in

index 69a37e50aedd1e9084fc4fa7fc471103839ee957..f978a52d568b1d19a2e456285dcd48f6b11e615f 100644 (file)
@@ -7,7 +7,16 @@
 ## Makefile Template for Shared Libraries
 ##
 
-COMPILE = $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c
+NT_LTFLAGS = --only-$(LINKAGE)
+LTFLAGS = $(@PLAT@_LTFLAGS) 
+
+NT_DYN_LT_NO_UNDEF = -no-undefined
+LT_NO_UNDEF = $(@PLAT@_@LIB_LINKAGE@_LT_NO_UNDEF)
+
+COMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) $(CFLAGS) $(EXTRA_DEFS) -c
+LTLIBLINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) \
+               $(LTVERSION) $(LT_NO_UNDEF)
+
 MKDEPFLAG = -l
 
 .SUFFIXES: .c .o .lo
@@ -15,17 +24,26 @@ MKDEPFLAG = -l
 .c.lo:
        $(COMPILE) $<
 
+
+# DYN_EXT (@DYN_EXT@) describes the extension assoicated with a
+# dynamic library, e.g. so, dll
+
+DYN_EXT=@DYN_EXT@
+
 $(LIBRARY):  version.lo
-       $(LTLIBLINK) -rpath $(libdir) -o $@ $(OBJS) version.lo
-       $(RM) ../$@;    \
+       $(LTLIBLINK) -rpath $(libdir) -o $@ $(OBJS) version.lo $(EXTRA_LIBS)
+       $(RM) ../$@
        (d=`$(PWD)` ; $(LN_S) `$(BASENAME) $$d`/$@ ../$@)
        $(RM) ../`$(BASENAME) $@ .la`.a;        \
        (d=`$(PWD)`; t=`$(BASENAME) $@ .la`.a; $(LN_S) `$(BASENAME) $$d`/.libs/$$t ../$$t)
        # If we want our binaries to link dynamically with libldap{,_r} liblber...
        # We also symlink the .so.# so we can run the tests without installing
        if test "$(LINK_BINS_DYNAMIC)" = "yes"; then \
-               (d=`$(PWD)`; t=`$(BASENAME) $@ .la`.so; $(LN_S) `$(BASENAME) $$d`/.libs/$$t ../$$t); \
-               (d=`$(PWD)`; b=`$(BASENAME) $@ .la`; t=`ls $$d/.libs/$$b.so.?`; $(LN_S) `$(BASENAME) $$d`/.libs/`$(BASENAME) $$t` ../`$(BASENAME) $$t`); \
+               (d=`$(PWD)`; b=`$(BASENAME) $@ .la`; t=`ls $$d/.libs/$$b*.$(DYN_EXT)`; t=`$(BASENAME) $$t`; $(LN_S) `$(BASENAME) $$d`/.libs/$$t ../$$t); \
+               if test "$(DYN_EXT)" != dll; then \
+                   (d=`$(PWD)`; b=`$(BASENAME) $@ .la`; t=`ls $$d/.libs/$$b.$(DYN_EXT).?`; $(LN_S) `$(BASENAME) $$d`/.libs/`$(BASENAME) $$t` ../`$(BASENAME) $$t`); \
+               fi \
        fi
 
 Makefile: $(top_srcdir)/build/lib-shared.mk
+
index 76fb1000e4c5389e9076a206ce199a963867f2fe..bc7958a57d7a6ba805d62efc89b8945da0a70e80 100644 (file)
@@ -25,7 +25,8 @@ clean-common:         FORCE
        $(RM) $(LIBRARY) ../$(LIBRARY) $(XLIBRARY) \
                $(PROGRAMS) $(XPROGRAMS) $(XSRCS) $(XXSRCS) \
                *.o *.lo a.out core version.c .libs/* \
-               ../`$(BASENAME) $(LIBRARY) .la`.so*
+               ../`$(BASENAME) $(LIBRARY) .la`.so* \
+               ../`$(BASENAME) $(LIBRARY) .la`*.dll *.exe
 
 depend-common: FORCE
        $(MKDEP) $(DEFS) $(DEFINES) $(SRCS) $(XXSRCS)
index 7a9c45925f5b8b2921cc877b0d66635aca62d7be..b3deffb94f5e6c49ba286f9321c7d53561533f35 100644 (file)
@@ -9,8 +9,20 @@
 
 LIBRARY = $(LIBBASE).la
 LIBSTAT = lib$(LIBBASE).a
+
 LTFLAGS = --only-$(LINKAGE)
 
+COMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) $(CFLAGS) $(MODDEFS) -c
+LTLIBLINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) \
+               $(LTVERSION) $(LT_NO_UNDEF)
+
+MKDEPFLAG = -l
+
+.SUFFIXES: .c .o .lo
+
+.c.lo:
+       $(COMPILE) $<
+
 all-no lint-no 5lint-no depend-no install-no: FORCE
        @echo "run configure with $(BUILD_OPT) to make $(LIBBASE)"
 
@@ -20,8 +32,9 @@ version.c: $(OBJS)
        $(RM) $@
        $(MKVERSION) $(LIBBASE) > $@
 
-$(LIBRARY): version.lo
-       $(LTLIBLINK) -module -rpath $(moduledir) -o $@ $(OBJS) version.lo $(MODLIBS)
+$(LIBRARY): $(MODDEPS) version.lo
+       $(LTLIBLINK) -module -rpath $(moduledir) -o $@ $(OBJS) version.lo \
+           $(MODLIBS)
 
 $(LIBSTAT): version.lo
        $(AR) ruv $@ `echo $(OBJS) | sed 's/\.lo/.o/g'` version.o
@@ -71,12 +84,5 @@ depend-yes depend-mod: depend-local-lib FORCE
 veryclean-local-lib:
 veryclean-lib:         clean-lib veryclean-local-lib
 
-COMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) $(CFLAGS) -c
-MKDEPFLAG = -l
-
-.SUFFIXES: .c .o .lo
-
-.c.lo:
-       $(COMPILE) $<
-
 Makefile: $(top_srcdir)/build/mod.mk
+
index 4f795ff3533b8fefa33eaeeeac6fb6c8e1155b4a..f7e3166784b61cd8c1c319c3f6eac2eacf13db44 100644 (file)
@@ -10,7 +10,8 @@
 all-common: $(PROGRAMS) FORCE
 
 clean-common:  FORCE
-       $(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) *.o *.lo a.out core *.core .libs/*
+       $(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) *.o *.lo a.out core *.core \
+                   .libs/* *.exe
 
 depend-common: FORCE
        $(MKDEP) $(DEFS) $(DEFINES) $(SRCS)
index ee6d5daa2741cadefa7aa9049201e0897cd6ae81..c1e60ebaf1564a96048ccad9a21f8ce27769b220 100644 (file)
@@ -38,7 +38,7 @@ lint-yes: lint-local-srv FORCE
 
 clean-local-srv:
 clean-srv:     clean-local-srv FORCE
-       $(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) *.o a.out core .libs/*
+       $(RM) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) *.o a.out core .libs/* *.exe
 
 depend-local-srv:
 depend-yes: depend-local-srv FORCE
index 8f6f92efddd7e07b409a094d82e95cb220e7ad1e..95204b85a587aace43cb2de319466a43eb5f2e62 100644 (file)
@@ -56,7 +56,6 @@ MKVERSION = $(top_srcdir)/build/mkversion -v "$(VERSION)"
 LIBTOOL = @LIBTOOL@
 LIBVERSION = 0:0:0
 LTVERSION = -version-info $(LIBVERSION)
-LTLIBLINK  = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(LTVERSION)
 LTLINK  = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS)
 LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL) 
 
@@ -179,3 +178,4 @@ Makefile: Makefile.in $(top_srcdir)/build/top.mk
 FORCE:
 
 ##---------------------------------------------------------------------------
+
index 037ad897ba248d13bbf6851892b8ac85406b4e4c..7b706f34d5736fb8c27a5672838a294452f32201 100644 (file)
@@ -1,6 +1,8 @@
 # $OpenLDAP$
 
-PROGRAMS= rp500 fax500 xrpcomp.tmp
+UNIX_PRGS = rp500 fax500
+EXEPRGS = $(@PLAT@_PRGS)
+PROGRAMS = xrpcomp.tmp $(EXEPRGS)
 
 SRCS= main.c faxtotpc.c rp500.c
 XSRCS=fax5version.c rpversion.c
@@ -33,6 +35,11 @@ xrpcomp.tmp: xrpcomp
 
 install-local: $(PROGRAMS) FORCE
        -$(MKDIR) $(DESTDIR)$(libexecdir)
-       $(LTINSTALL) $(INSTALLFLAGS) -m 755 rp500 $(DESTDIR)$(libexecdir)
-       $(LTINSTALL) $(INSTALLFLAGS) -m 755 fax500 $(DESTDIR)$(libexecdir)
-       $(INSTALL) $(INSTALLFLAGS) -m 755 xrpcomp.tmp $(DESTDIR)$(libexecdir)/xrpcomp
+       @(                                                              \
+           for prg in $(EXEPRGS); do                                   \
+               $(LTINSTALL) $(INSTALLFLAGS) -m 755 $$prg$(EXEEXT)      \
+                   $(DESTDIR)$(libexecdir);                            \
+           done                                                        \
+       )
+       $(INSTALL) $(INSTALLFLAGS) -m 755 xrpcomp.tmp   \
+               $(DESTDIR)$(libexecdir)/xrpcomp
index 2192c2b531ff65220d0f3c01cdb6f84fa37d95b0..ce71dc9e0dea80bec97b4ad221f7b3559d44532f 100644 (file)
@@ -3,7 +3,9 @@
 SRCS=  main.c
 XSRCS= version.c
 OBJS=  main.o
-PROGRAMS= in.xfingerd
+
+UNIX_PRGS = in.xfingerd
+PROGRAMS = $(@PLAT@_PRGS)
 
 LDAP_INCDIR= ../../include
 LDAP_LIBDIR= ../../libraries
@@ -20,4 +22,10 @@ version.c: ${OBJS} ${LDAP_LIBDEPEND}
 
 install-local: $(PROGRAMS) FORCE
        -$(MKDIR) $(DESTDIR)$(libexecdir)
-       $(LTINSTALL) $(INSTALLFLAGS) -m 755 in.xfingerd $(DESTDIR)$(libexecdir)
+       @(                                                              \
+           for prg in $(PROGRAMS); do                                  \
+               $(LTINSTALL) $(INSTALLFLAGS) -m 755 $$prg$(EXEEXT)      \
+                   $(DESTDIR)$(libexecdir);                            \
+           done                                                        \
+       )
+
index 5022e50ba827121858eecf956e4aecb63eec9304..aeecb64d908b210d319f2278fc5ee6b1821a8e33 100644 (file)
@@ -2,9 +2,12 @@
 ##
 ## Makefile for gopher clients
 ##
-PROGRAMS= go500gw go500
+
+UNIX_PRGS= go500gw go500
+PROGRAMS = $(@PLAT@_PRGS)
 
 SRCS=  go500.c go500gw.c 
+
 XSRCS= gwversion.c goversion.c
 GOOBJS =  go500.o
 GWOBJS =  go500gw.o
@@ -31,7 +34,12 @@ gwversion.c: ${GWOBJS} $(LDAP_LIBDEPEND)
 
 install-local: $(PROGRAMS) go500gw.help FORCE
        -$(MKDIR) $(DESTDIR)$(libexecdir) $(DESTDIR)$(datadir)
-       $(LTINSTALL) $(INSTALLFLAGS) -m 755 go500 $(DESTDIR)$(libexecdir)
-       $(LTINSTALL) $(INSTALLFLAGS) -m 755 go500gw $(DESTDIR)$(libexecdir)
+       @(                                                              \
+           for prg in $(PROGRAMS); do                                  \
+               $(LTINSTALL) $(INSTALLFLAGS) -m 755 $$prg$(EXEEXT)      \
+                   $(DESTDIR)$(libexecdir);                            \
+           done                                                        \
+       )
        -$(MV) $(DESTDIR)$(datadir)/go500gw.help $(DESTDIR)$(datadir)/go500gw.help-
        $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/go500gw.help $(DESTDIR)$(datadir)
+
index 4cfb4d7281c52254f6195d6df190510d3e71be86..337cb38f3f05b5b65291db4c18a75d2faa93af5a 100644 (file)
@@ -1,6 +1,7 @@
 # $OpenLDAP$
 
-PROGRAMS= mail500
+UNIX_PRGS = mail500
+PROGRAMS = $(@PLAT@_PRGS)
 
 SRCS=  main.c
 XSRCS= version.c
@@ -21,4 +22,10 @@ version.c: ${OBJS} $(LDAP_LIBDEPEND)
 
 install-local: $(PROGRAMS) FORCE
        -$(MKDIR) $(DESTDIR)$(libexecdir)
-       $(LTINSTALL) $(INSTALLFLAGS) -m 755 mail500 $(DESTDIR)$(libexecdir)
+       @(                                                              \
+           for prg in $(PROGRAMS); do                                  \
+               $(LTINSTALL) $(INSTALLFLAGS) -m 755 $$prg$(EXEEXT)      \
+                   $(DESTDIR)$(libexecdir);                            \
+           done                                                        \
+       )
+
index d8809107de44cab55fb316df982aea5119e6d557..a1919f84b15af8f9646f072d240146bd6d67e726 100644 (file)
@@ -1,6 +1,8 @@
 # $OpenLDAP$
 
-PROGRAMS= rcpt500
+UNIX_PRGS = rcpt500
+PROGRAMS = $(@PLAT@_PRGS)
+
 SRCS= main.c cmds.c help.c query.c
 XSRCS= version.c
 OBJS= main.o cmds.o help.o query.o
@@ -21,6 +23,12 @@ version.c: ${OBJS} $(LDAP_LIBDEPEND)
 
 install-local: $(PROGRAMS) rcpt500.help FORCE
        -$(MKDIR) $(DESTDIR)$(libexecdir) $(DESTDIR)$(datadir)
-       $(LTINSTALL) $(INSTALLFLAGS) -m 755 rcpt500 $(DESTDIR)$(libexecdir)
+       @(                                                              \
+           for prg in $(PROGRAMS); do                                  \
+               $(LTINSTALL) $(INSTALLFLAGS) -m 755 $$prg$(EXEEXT)      \
+                   $(DESTDIR)$(libexecdir);                            \
+           done                                                        \
+       )
        -$(MV) $(DESTDIR)$(datadir)/rcpt500.help $(DESTDIR)$(datadir)/rcpt500.help-
        $(INSTALL) $(INSTALLFLAGS) -m 644 $(srcdir)/rcpt500.help $(DESTDIR)$(datadir)
+
index 335d1d2c8de30a19c7e538942c6b53fa660e3d31..d9f3e60ac4a3d6a7368f7e40db6434fe2cc21058 100644 (file)
@@ -8,7 +8,10 @@ OBJS   = ldapsearch.o ldapmodify.o ldapdelete.o ldapmodrdn.o ldappasswd.o
 LDAP_INCDIR= ../../include       
 LDAP_LIBDIR= ../../libraries
 
-XLIBS =  -lldif -lldap -llber -llutil
+NT_DYN_DEFS = -DLIBLBER_DECL=dllimport -DLIBLDAP_DECL=dllimport
+CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_DEFS)
+
+XLIBS =  -llutil -lldif -lldap -llber
 XXLIBS = $(SECURITY_LIBS) $(LDIF_LIBS) $(LUTIL_LIBS)
 
 XSRCS  = ldsversion.c ldmversion.c lddversion.c ldrversion.c ldpversion.c
@@ -56,10 +59,12 @@ ldrversion.c: ldapmodrdn.o $(LDAP_LIBDEPEND)
 
 install-local: FORCE
        -$(MKDIR) $(DESTDIR)$(bindir)
-       $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldapsearch $(DESTDIR)$(bindir)
-       $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldapmodify $(DESTDIR)$(bindir)
-       $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldapdelete $(DESTDIR)$(bindir)
-       $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldapmodrdn $(DESTDIR)$(bindir)
-       $(LTINSTALL) $(INSTALLFLAGS) -m 755 ldappasswd $(DESTDIR)$(bindir)
+       @(                                                              \
+           for prg in $(PROGRAMS); do                                  \
+               $(LTINSTALL) $(INSTALLFLAGS) -m 755 $$prg$(EXEEXT)      \
+                   $(DESTDIR)$(bindir);                                \
+           done                                                        \
+       )
        $(RM) $(DESTDIR)$(bindir)/ldapadd$(EXEEXT)
        $(LN) $(DESTDIR)$(bindir)/ldapmodify$(EXEEXT) $(DESTDIR)$(bindir)/ldapadd$(EXEEXT)
+
index 8af1f5a2afd5a9e59817387637c8358b17b4e25d..6fa47d03cab00dce0aeb945fda0358a6700cec97 100644 (file)
@@ -11,7 +11,10 @@ PROGRAMS= ud
 LDAP_INCDIR= ../../include       
 LDAP_LIBDIR= ../../libraries
 
-XLIBS =  -lldif -lldap -llber -llutil
+NT_DYN_DEFS = -DLIBLBER_DECL=dllimport -DLIBLDAP_DECL=dllimport
+CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_DEFS)
+
+XLIBS =  -llutil -lldif -lldap -llber
 XXLIBS = $(TERMCAP_LIBS) $(SECURITY_LIBS) $(LUTIL_LIBS)
 
 ud : version.o
@@ -24,4 +27,10 @@ version.c: ${OBJS} $(LDAP_LIBDEPEND)
 install-local: FORCE
        -$(MKDIR) $(DESTDIR)$(bindir)
        -mv -f $(DESTDIR)$(bindir)/ud $(DESTDIR)$(bindir)/ud-
-       $(LTINSTALL) $(INSTALLFLAGS) -m 755 ud $(DESTDIR)$(bindir)
+       @(                                                              \
+           for prg in $(PROGRAMS); do                                  \
+               $(LTINSTALL) $(INSTALLFLAGS) -m 755 $$prg$(EXEEXT)      \
+                   $(DESTDIR)$(bindir);                                \
+           done                                                        \
+       )
+
index 33459b7a91af363266ff5a128e636015aa9df091..f996d13dd4644971db9220ed01157aba7af6b234 100644 (file)
@@ -22,6 +22,18 @@ LDAP_LIBDIR= ../../libraries
 XLIBS = -llber
 XXLIBS = 
 
+LINKAGE = @LT_LIB_LINKAGE@
+
+NT_DYN_LIB_DEFS  = -DLIBLBER_DECL=dllexport
+NT_DYN_TEST_DEFS = -DLIBLBER_DECL=dllimport
+
+# Extras for building the library
+EXTRA_DEFS = $(@PLAT@_@LIB_LINKAGE@_LIB_DEFS)
+EXTRA_LIBS =
+
+# Only the test programs will pick up these defs.
+CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_TEST_DEFS)
+
 dtest:    $(LIBRARY) dtest.o
        $(LTLINK) $(LDFLAGS) -o $@ dtest.o $(LIBS)
 etest:  $(LIBRARY) etest.o
index f4cf68cd87734d7abdb224f80961d31e48eeb296..da2ab994706cb70ef20e15663cca3af7fdbecfeb 100644 (file)
@@ -31,9 +31,22 @@ OBJS = bind.lo open.lo result.lo error.lo compare.lo search.lo \
 LDAP_INCDIR= ../../include       
 LDAP_LIBDIR= ../../libraries
 
-XLIBS = -lldap -llber
+XLIBS = -lldap -llber -llutil
 XXLIBS = $(SECURITY_LIBS) $(TLS_LIBS)
 
+LINKAGE = @LT_LIB_LINKAGE@
+
+NT_DYN_LIB_LIBS  = -llber $(AC_LIBS)
+NT_DYN_LIB_DEFS  = -DLIBLBER_DECL=dllimport -DLIBLDAP_DECL=dllexport
+NT_DYN_TEST_DEFS = -DLIBLBER_DECL=dllimport -DLIBLDAP_DECL=dllimport
+
+# Extras for building the library
+EXTRA_DEFS = $(@PLAT@_@LIB_LINKAGE@_LIB_DEFS)
+EXTRA_LIBS = $(@PLAT@_@LIB_LINKAGE@_LIB_LIBS)
+
+# Only the test programs will pick up these defs.
+CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_TEST_DEFS)
+
 apitest:       $(LIBRARY) apitest.o $(LDAP_LIBLBER_DEPEND)
        $(LTLINK) $(LDFLAGS) -o $@ apitest.o $(LIBS)
 ltest: $(LIBRARY) test.o $(LDAP_LIBLBER_DEPEND)
index 47058146e9d7c1edff8d6d7132444d7078f2a4a9..1780e17223657af7adf761e53b72d7ce23bbd8ad 100644 (file)
@@ -35,10 +35,23 @@ LDAP_INCDIR= ../../include
 LDAP_LIBDIR= ../../libraries
 
 XDEFS = -DLDAP_R_COMPILE -I$(XXDIR)
-XLIBS = -lldap_r -llber
+XLIBS = -lldap_r -llber -llutil
 XXLIBS = $(SECURITY_LIBS) $(LUTIL_LIBS)
 XXXLIBS = $(LTHREAD_LIBS)
 
+LINKAGE = @LT_LIB_LINKAGE@
+
+NT_DYN_LIB_LIBS  = -llber $(AC_LIBS)
+NT_DYN_LIB_DEFS  = -DLIBLBER_DECL=dllimport -DLIBLDAP_DECL=dllexport
+NT_DYN_TEST_DEFS = -DLIBLBER_DECL=dllimport -DLIBLDAP_DECL=dllimport
+
+# Extras for building the library
+EXTRA_DEFS = $(@PLAT@_@LIB_LINKAGE@_LIB_DEFS)
+EXTRA_LIBS = $(@PLAT@_@LIB_LINKAGE@_LIB_LIBS)
+
+# Only the test programs will pick up these defs.
+CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_TEST_DEFS)
+
 .links :
        @for i in $(XXSRCS); do \
                $(RM) $$i ; \
index 46fce8ea4fa90087f379c59282fca9ab16f0cfaa..83cf2af597cfb0a507703fdeaf9f307f38a962d9 100644 (file)
@@ -4,12 +4,31 @@
 ##
 
 LIBRARY        = liblutil.a
-SRCS   = base64.c debug.c detach.c entropy.c \
-       md5.c passwd.c sha1.c getpass.c lockf.c utils.c sockpair.c
-OBJS   = base64.o debug.o detach.o entropy.o \
+
+NT_SRCS = nt_err.c ntservice.c
+NT_OBJS = nt_err.o ntservice.o slapdmsg.res
+
+UNIX_SRCS = detach.c
+UNIX_OBJS = detach.o
+
+SRCS   = base64.c debug.c entropy.c \
+       md5.c passwd.c sha1.c getpass.c lockf.c utils.c sockpair.c \
+       @LIBSRCS@ $(@PLAT@_SRCS)
+
+OBJS   = base64.o debug.o entropy.o \
        md5.o passwd.o sha1.o getpass.o lockf.o utils.o sockpair.o \
-       @LIBOBJS@
+       @LIBOBJS@ $(@PLAT@_OBJS)
 
 LDAP_INCDIR= ../../include       
 LDAP_LIBDIR= ../../libraries
 
+# These rules are for a Mingw32 build, specifically.
+# It's ok for them to be here because the clean rule is harmless, and
+# slapdmsg.res won't get built unless it's declared in OBJS.
+
+slapdmsg.res: slapdmsg.rc slapdmsg.bin
+       windres $< -O coff -o $@
+
+clean-local:
+       $(RM) *.res
+
index 8d5951637e54bec1e7f42d952ee28b5aa4871fcf..4219a1b0ea2cb35551a749299cfd7a18d1da54aa 100644 (file)
@@ -3,7 +3,9 @@
 ## Makefile.in for slurpd
 ##
 
-PROGRAMS = slurpd
+UNIX_PRGS = slurpd
+
+PROGRAMS = $(@PLAT@_PRGS)
 XPROGRAMS = sslurpd
 
 XSRCS  = version.c
@@ -21,7 +23,7 @@ LDAP_LIBDIR= ../../libraries
 BUILD_OPT = "--enable-slurpd"
 BUILD_SRV = @BUILD_SLURPD@
 
-all-local-srv:         slurpd
+all-local-srv:         $(PROGRAMS)
 
 # $(LTHREAD_LIBS) must be last!
 XLIBS = -lldif -lldap_r -llber -llutil
@@ -41,4 +43,10 @@ version.c: $(OBJS) $(LDAP_LIBDEPEND) $(LDAP_LIBTHREAD_DEPEND)
 
 install-local-srv: FORCE
        -$(MKDIR) $(DESTDIR)$(libexecdir)
-       $(LTINSTALL) $(INSTALLFLAGS) -m 755 slurpd $(DESTDIR)$(libexecdir)
+       @(                                                              \
+           for prg in $(PROGRAMS); do                                  \
+               $(LTINSTALL) $(INSTALLFLAGS) -m 755 $$prg$(EXEEXT)      \
+                   $(DESTDIR)$(libexecdir);                            \
+           done                                                        \
+       )
+
index 16c0a66dea2cd5de33baf04bb9468636b4e2c061..bbe42822236386f981f75f6ba4594034fdeed265 100644 (file)
@@ -4,7 +4,9 @@
 ##
 ## tests Makefile.in for OpenLDAP
 
-PROGRAMS = slapd-tester slapd-search slapd-read slapd-addel
+UNIX_PRGS = slapd-tester slapd-search slapd-read slapd-addel
+PROGRAMS = $(@PLAT@_PRGS)
+
 SRCS     = slapd-tester.c slapd-search.c slapd-read.c slapd-addel.c
 
 LDAP_INCDIR= ../../include