-PROGRAMS= rp500 fax500
+# $OpenLDAP$
+
+UNIX_PRGS = rp500 fax500
+EXEPRGS = $(@PLAT@_PRGS)
+PROGRAMS = xrpcomp.tmp $(EXEPRGS)
SRCS= main.c faxtotpc.c rp500.c
XSRCS=fax5version.c rpversion.c
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
+XLIBS = -lldap -llber -llutil
+XXLIBS = $(SECURITY_LIBS) $(LUTIL_LIBS)
+
rp500 : rpversion.o
- $(CC) $(LDFLAGS) -o $@ $(RPOBJS) rpversion.o $(LIBS)
+ $(LTLINK) -o $@ $(RPOBJS) rpversion.o $(LIBS)
fax500 : fax5version.o
- $(CC) $(LDFLAGS) -o $@ $(RPOBJS) fax5version.o $(LIBS)
+ $(LTLINK) -o $@ $(RPOBJS) fax5version.o $(LIBS)
rpversion.c: ${RPOBJS} $(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)/Versionrp.c > $@)
+ @-$(RM) $@
+ $(MKVERSION) rp500 > $@
fax5version.c: ${FAX5OBJS} $(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: $(PROGRAMS) xrpcomp FORCE
- -$(MKDIR) -p $(libexecdir)
- $(INSTALL) $(INSTALLFLAGS) -m 755 rp500 $(libexecdir)
- $(INSTALL) $(INSTALLFLAGS) -m 755 fax500 $(libexecdir)
- $(SED) -e 's%LIBEXECDIR%$(libexecdir)%' $(srcdir)/xrpcomp > /tmp/xrpcomp.tmp
- $(INSTALL) $(INSTALLFLAGS) -m 755 /tmp/xrpcomp.tmp $(libexecdir)/xrpcomp
- $(RM) /tmp/xrpcomp.tmp
+ @-$(RM) $@
+ $(MKVERSION) fax500 > $@
+
+xrpcomp.tmp: xrpcomp
+ $(SED) -e 's|%LIBEXECDIR%|$(libexecdir)|' $(srcdir)/xrpcomp > xrpcomp.tmp
+
+install-local: $(PROGRAMS) FORCE
+ -$(MKDIR) $(DESTDIR)$(libexecdir)
+ @( \
+ for prg in $(EXEPRGS); do \
+ $(LTINSTALL) $(INSTALLFLAGS) -s -m 755 $$prg$(EXEEXT) \
+ $(DESTDIR)$(libexecdir); \
+ done \
+ )
+ $(INSTALL_SCRIPT) $(INSTALLFLAGS) xrpcomp.tmp \
+ $(DESTDIR)$(libexecdir)/xrpcomp