cmd: Convert to using libtool
[openafs.git] / src / auth / Makefile.in
index 9d488cd..7a6668d 100644 (file)
@@ -7,21 +7,23 @@
 
 srcdir=@srcdir@
 include @TOP_OBJDIR@/src/config/Makefile.config
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
+include @TOP_OBJDIR@/src/config/Makefile.lwp
 
-OBJS= cellconfig.o ktc.o userok.o writeconfig.o authcon.o \
-    acfg_errors.o ktc_errors.o
-KOBJS= cellconfig.o ktc.krb.o userok.o writeconfig.o authcon.o \
-    acfg_errors.o ktc_errors.o
+
+OBJS= cellconfig.o keys.o ktc.o userok.o writeconfig.o authcon.o \
+    acfg_errors.o ktc_errors.o token.xdr.o token.o realms.o netrestrict.o
+
+KOBJS= cellconfig.o keys.o ktc.krb.o userok.o writeconfig.o authcon.o \
+    acfg_errors.o ktc_errors.o token.xdr.o token.o realms.o netrestrict.o
 
 LIBS=libauth.a \
-      ${TOP_LIBDIR}/librxkad.a ${TOP_LIBDIR}/libdes.a \
-      ${TOP_LIBDIR}/librx.a ${TOP_LIBDIR}/libsys.a \
-      ${TOP_LIBDIR}/liblwp.a ${TOP_LIBDIR}/util.a
-INCLS=cellconfig.h auth.h keys.h
+      ${TOP_LIBDIR}/librxkad.a \
+      ${TOP_LIBDIR}/librx.a \
+      ${TOP_LIBDIR}/libsys.a \
+      ${TOP_LIBDIR}/liblwp.a \
+      ${TOP_LIBDIR}/util.a
+
+INCLS=cellconfig.h auth.h keys.h internal.h
 KSRCS=auth.h
 UKSRCS=${KSRCS} cellconfig.h acfg_errors.c keys.h cellconfig.c \
        ktc.c authcon.c ktc_errors.c
@@ -31,7 +33,16 @@ all: ${TOP_LIBDIR}/libauth.a ${TOP_LIBDIR}/libauth.krb.a depinstall
 depinstall: ${TOP_INCDIR}/afs/keys.h \
        ${TOP_INCDIR}/afs/cellconfig.h \
        ${TOP_INCDIR}/afs/auth.h \
-       ${TOP_INCDIR}/afs/ktc.h
+       ${TOP_INCDIR}/afs/ktc.h \
+       ${TOP_INCDIR}/afs/token.h \
+       token.h \
+       Ktoken.xdr.c \
+       token.xdr.c
+
+${TOP_INCDIR}/afs/token.h: token.h
+       ${INSTALL_DATA} $? $@
+
+generated: acfg_errors.c cellconfig.h ktc_errors.c auth.h
 
 ${TOP_INCDIR}/afs/keys.h: keys.h
        ${INSTALL_DATA} $? $@
@@ -52,6 +63,7 @@ ${TOP_LIBDIR}/libauth.krb.a: libauth.krb.a
        ${INSTALL_DATA} libauth.krb.a $@
 
 cellconfig.o: cellconfig.c ${INCLS}
+keys.o: keys.c ${INCLS}
 ktc.o: ktc.c ${INCLS} ${TOP_INCDIR}/afs/vice.h
 writeconfig.o: writeconfig.c ${INCLS}
 authcon.o: authcon.c ${INCLS}
@@ -59,9 +71,12 @@ userok.o: userok.c ${INCLS}
 cellconfig.o: cellconfig.c ${INCLS}
 copyauth.o: copyauth.c ${INCLS} AFS_component_version_number.o
 setkey.o: setkey.c ${INCLS} AFS_component_version_number.o
+realms.o: realms.c ${INCLS}
+netrestrict.o: ${INCLS}
 
+CFLAGS_ktc.krb.o = -DAFS_KERBEROS_ENV
 ktc.krb.o: ktc.c ${INCLS} ${TOP_INCDIR}/afs/vice.h
-       ${CCOBJ} ${CFLAGS} -DAFS_KERBEROS_ENV -c ${srcdir}/ktc.c -o ktc.krb.o
+       $(AFS_CCRULE) $(srcdir)/ktc.c
 
 libauth.a: $(OBJS) AFS_component_version_number.o
        -$(RM) -f libauth.a
@@ -74,23 +89,30 @@ libauth.krb.a: $(KOBJS) AFS_component_version_number.o
        $(RANLIB) $@
 
 copyauth: copyauth.o ${LIBS}
-       $(CC) $(CFLAGS) -o copyauth copyauth.o ${LIBS} ${XLIBS}
+       $(AFS_LDRULE) copyauth.o ${LIBS} ${XLIBS}
 
 setkey: setkey.o ${LIBS}
-       ${CC} $(CFLAGS) -o setkey setkey.o ${LIBS} ${XLIBS}
-
-acfg_errors.o: acfg_errors.c
+       $(AFS_LDRULE) setkey.o ${LIBS} ${XLIBS}
 
 acfg_errors.c cellconfig.h: acfg_errors.et cellconfig.p.h
        $(RM) -f cellconfig.h acfg_errors.c
        ${COMPILE_ET} -p ${srcdir} acfg_errors -h cellconfig
 
-ktc_errors.o: ktc_errors.c
+ktc.o: token.h
 
 ktc_errors.c auth.h: ktc_errors.et auth.p.h
        $(RM) -f auth.h ktc_errors.c
        ${COMPILE_ET} -p ${srcdir} ktc_errors -h auth
 
+Ktoken.xdr.c: token.xg
+       $(RXGEN) -A -x -k -c -o $@ $(srcdir)/token.xg
+
+token.xdr.c: token.xg
+       $(RXGEN) -A -x -c -o $@ ${srcdir}/token.xg
+
+token.h : token.xg
+       $(RXGEN) -A -x -h -o $@ ${srcdir}/token.xg
+
 #
 # Install targets
 #
@@ -99,20 +121,20 @@ install: libauth.a libauth.krb.a auth.h cellconfig.h
        ${INSTALL} -d ${DESTDIR}${includedir}/afs
        ${INSTALL_DATA} libauth.a ${DESTDIR}${libdir}/afs/libauth.a
        ${INSTALL_DATA} libauth.krb.a ${DESTDIR}${libdir}/afs/libauth.krb.a
-       ${INSTALL_DATA} keys.h ${DESTDIR}${includedir}/afs/keys.h
+       ${INSTALL_DATA} ${srcdir}/keys.h ${DESTDIR}${includedir}/afs/keys.h
        ${INSTALL_DATA} cellconfig.h ${DESTDIR}${includedir}/afs/cellconfig.h
        ${INSTALL_DATA} auth.h ${DESTDIR}${includedir}/afs/auth.h
-       ${INSTALL_DATA} ktc.h ${DESTDIR}${includedir}/afs/ktc.h
+       ${INSTALL_DATA} ${srcdir}/ktc.h ${DESTDIR}${includedir}/afs/ktc.h
 
 dest: libauth.a libauth.krb.a auth.h cellconfig.h
        ${INSTALL} -d ${DEST}/lib/afs
        ${INSTALL} -d ${DEST}/include/afs
        ${INSTALL_DATA} libauth.a ${DEST}/lib/afs/libauth.a
        ${INSTALL_DATA} libauth.krb.a ${DEST}/lib/afs/libauth.krb.a
-       ${INSTALL_DATA} keys.h ${DEST}/include/afs/keys.h
+       ${INSTALL_DATA} ${srcdir}/keys.h ${DEST}/include/afs/keys.h
        ${INSTALL_DATA} cellconfig.h ${DEST}/include/afs/cellconfig.h
        ${INSTALL_DATA} auth.h ${DEST}/include/afs/auth.h
-       ${INSTALL_DATA} ktc.h ${DEST}/include/afs/ktc.h
+       ${INSTALL_DATA} ${srcdir}/ktc.h ${DEST}/include/afs/ktc.h
 
 #
 # Misc. targets
@@ -121,7 +143,8 @@ test:
        cd test; $(MAKE)
 
 clean:
-       $(RM) -f *.o *.a copyauth setkey auth.h cellconfig.h acfg_errors.c ktc_errors.c core \
-       AFS_component_version_number.c
+       $(RM) -f *.o *.a copyauth setkey auth.h cellconfig.h acfg_errors.c \
+               ktc_errors.c token.h token.xdr.c core Ktoken.xdr.c \
+               AFS_component_version_number.c
 
 include ../config/Makefile.version