## Process this file with `automake' to generate `Makefile.in'
## -*-makefile-*-
##
-## $Id: Makefile.am,v 1.6 1997/09/18 11:17:18 mdw Exp $
+## $Id: Makefile.am,v 1.12 1999/05/04 16:36:03 mdw Exp $
##
## Makefile for `become'
##
-## (c) 1997 EBI
+## (c) 1998 EBI
##
##----- Licensing notice ----------------------------------------------------
##----- Revision history ----------------------------------------------------
##
## $Log: Makefile.am,v $
+## Revision 1.12 1999/05/04 16:36:03 mdw
+## Changes for new Automake version.
+##
+## Revision 1.11 1998/06/18 15:52:05 mdw
+## Remove the IDEA test case.
+##
+## Revision 1.10 1998/04/23 13:17:17 mdw
+## New program `bcquery', and `ypstuff' module added.
+##
+## Revision 1.9 1998/02/20 18:12:35 mdw
+## Make the `become' program setuid root when installing.
+##
+## Revision 1.8 1998/01/12 16:45:36 mdw
+## Fix copyright date.
+##
+## Revision 1.7 1997/09/26 09:14:57 mdw
+## Merged blowfish branch into trunk.
+##
+## Revision 1.6.2.1 1997/09/26 09:07:56 mdw
+## Use the Blowfish encryption algorithm instead of IDEA. This is partly
+## because I prefer Blowfish (without any particularly strong evidence) but
+## mainly because IDEA is patented and Blowfish isn't.
+##
## Revision 1.6 1997/09/18 11:17:18 mdw
## Fix comment leaders. Don't know why this CVS keeps breaking them.
## Could be DEC's bogus version of RCS being picked up.
## --- What to make ---
-bin_PROGRAMS = become keygen
-noinst_LIBRARIES = bcm
+bin_PROGRAMS = become keygen bcquery
+noinst_LIBRARIES = libbcm.a
##----- Building the main code ----------------------------------------------
## --- The library contains most of the interesting stuff ---
-bcm_SOURCES = \
+libbcm_a_SOURCES = \
check.c daemon.c \
lexer.l parser.y \
- class.c name.c netg.c rule.c sym.c userdb.c \
+ class.c name.c netg.c rule.c sym.c userdb.c ypstuff.c \
crypt.c \
noise.c rand.c \
- icrypt.c idea.c md5.c \
+ icrypt.c blowfish.c md5.c \
mdwopt.c tx.c utils.c \
\
become.h \
check.h daemon.h \
- lexer.h parser.h \
- class.h name.h netg.h rule.h sym.h userdb.h \
+ lexer.h parse.h \
+ class.h name.h netg.h rule.h sym.h userdb.h ypstuff.h \
crypt.h \
noise.h rand.h \
- icrypt.h idea.h md5.h \
+ icrypt.h blowfish.h blowfish-sbox.h md5.h \
mdwopt.h tx.h utils.h \
dbutils.h
-BUILT_SOURCES = \
- parser.c lexer.c parser.tab.h
-
## --- Yaccing and lexing ---
-$(srcdir)/parser.c $(srcdir)/parser.tab.h: $(srcdir)/parser.y
- @YACC@ -d -v $(srcdir)/parser.y
- mv y.tab.c $(srcdir)/parser.c
- mv y.tab.h $(srcdir)/parser.tab.h
+YFLAGS = -d -v
+
+BUILT_SOURCES = parser.c parser.h lexer.c
-$(srcdir)/lexer.c: $(srcdir)/lexer.l
- @LEX@ $(srcdir)/lexer.l
- mv lex.yy.c $(srcdir)/lexer.c
+dist-hook:
+ for i in $(BUILT_SOURCES); do \
+ [ -r $(distdir)/$$i ] || ln $$i $(distdir)/$$i; \
+ done
## --- The main programs ---
become_SOURCES = become.c
keygen_SOURCES = keygen.c
+bcquery_SOURCES = bcquery.c
become_DEPENDENCIES = libbcm.a
keygen_DEPENDENCIES = libbcm.a
+bcquery_DEPENDENCIES = libbcm.a
+
+##----- Become must be setuid root ------------------------------------------
+
+install-exec-hook:
+ become_prog=${bindir}/`echo become|sed '${transform}'`; \
+ { chown root $${become_prog} && \
+ chmod 4755 $${become_prog}; } || \
+ { echo ">>>>>"; \
+ echo ">>>>> $${become_prog} must be installed setuid-root"; \
+ echo ">>>>>"; \
+ }
##----- Testing -------------------------------------------------------------
$(LINK) crypt.tro libbcm.a $(LIBS)
blowfish-test: blowfish.tro libbcm.a
$(LINK) blowfish.tro libbcm.a $(LIBS)
-idea-test: idea.tro libbcm.a
- $(LINK) idea.tro libbcm.a $(LIBS)
md5-test: md5.tro libbcm.a
$(LINK) md5.tro libbcm.a $(LIBS)
netg-test: netg.tro libbcm.a