openldap/clients/ud/Makefile.in
Kurt Zeilenga 28a671d10d Revamp build system yet again to move all external libraries to
end of link.    Basic order is:
	$LDFLAGS internal-libs external-libs $LIBS $LTHREAD_LIBS

LTHREAD_LIBS is last as -lpthread (or equiv) must be last on many systems.
LIBS is next to last as some user might have put -lpthread (or equiv)
in $LIBS.
1999-01-14 01:31:43 +00:00

30 lines
860 B
Makefile

SRCS= main.c find.c mod.c print.c auth.c util.c help.c \
string_to_key.c group.c edit.c globals.c
XSRCS= version.c
OBJS= main.o find.o mod.o print.o auth.o util.o help.o \
string_to_key.o group.o globals.o edit.o
HDRS= ud.h
PROGRAMS= ud
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
XLIBS = -lldif -lldap -llber -llutil
XXLIBS = $(TERMCAP_LIBS) $(KRB_LIBS) $(LUTIL_LIBS)
ud : version.o
$(LTLINK) -o $@ version.o $(OBJS) $(LIBS)
version.c: ${OBJS} $(LDAP_LIBDEPEND)
$(RM) $@
(u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
< $(srcdir)/Version.c > $@)
install-local: FORCE
-$(MKDIR) $(bindir)
-mv -f $(bindir)/ud $(bindir)/ud-
$(LTINSTALL) $(INSTALLFLAGS) -m 775 ud $(bindir)