X-Git-Url: https://git.distorted.org.uk/~mdw/become/blobdiff_plain/8ddbfc6259aff24610996d1f84769774481dc62f..af4f4d6a77aceba8e2d6f58d15e894df320e7c24:/src/Makefile.am diff --git a/src/Makefile.am b/src/Makefile.am index 88434ec..f502d8e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,11 +1,11 @@ ## Process this file with `automake' to generate `Makefile.in' ## -*-makefile-*- ## -## $Id: Makefile.am,v 1.1 1997/08/04 10:22:09 mdw Exp $ +## $Id: Makefile.am,v 1.17 2004/04/08 01:36:20 mdw Exp $ ## ## Makefile for `become' ## -## (c) 1997 EBI +## (c) 1998 EBI ## ##----- Licensing notice ---------------------------------------------------- @@ -26,103 +26,84 @@ ## along with `become'; if not, write to the Free Software Foundation, ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -##----- Revision history ---------------------------------------------------- -## -## $Log: Makefile.am,v $ -## Revision 1.1 1997/08/04 10:22:09 mdw -## Sources placed under CVS control. -## - ##----- General setup things ------------------------------------------------ -## --- Standard setup things --- - -AUTOMAKE_OPTIONS = foreign - ## --- What to make --- -bin_PROGRAMS = become keygen -noinst_LIBRARIES = bcm +bin_PROGRAMS = become bcquery +noinst_LIBRARIES = libbecome.a ##----- Building the main code ---------------------------------------------- ## --- The library contains most of the interesting stuff --- -bcm_SOURCES = \ +libbecome_a_SOURCES = \ check.c daemon.c \ lexer.l parser.y \ - class.c name.c rule.c set.c sym.c userdb.c \ - crypt.c \ - noise.c rand.c \ - icrypt.c idea.c md5.c \ - mdwopt.c tx.c utils.c \ + class.c name.c netg.c rule.c userdb.c ypstuff.c \ \ become.h \ check.h daemon.h \ - lexer.h parser.h \ - class.h name.h rule.h set.h sym.h userdb.h \ - crypt.h \ - noise.h rand.h \ - icrypt.h idea.h md5.h \ - mdwopt.h tx.h utils.h + lexer.h parse.h \ + class.h name.h netg.h rule.h userdb.h ypstuff.h BUILT_SOURCES = \ - parser.c lexer.c parser.tab.h + parser.c parser.h lexer.c ## --- Yaccing and lexing --- -parser.c parser.tab.h: $(srcdir)/parser.y - @YACC@ -d -v $(srcdir)/parser.y - mv y.tab.c parser.c - mv y.tab.h parser.tab.h +YFLAGS = -d -v -lexer.c: $(srcdir)/lexer.l - @LEX@ $(srcdir)/lexer.l - mv lex.yy.c lexer.c +dist-hook: + for i in $(BUILT_SOURCES); do \ + [ -r $(distdir)/$$i ] || ln $$i $(distdir)/$$i; \ + done ## --- The main programs --- -LDADD = libbcm.a @LIBS@ @LEXLIB@ +LDADD = libbecome.a @LEXLIB@ + become_SOURCES = become.c -keygen_SOURCES = keygen.c +bcquery_SOURCES = bcquery.c + +become_DEPENDENCIES = libbecome.a +bcquery_DEPENDENCIES = libbecome.a -become keygen: libbcm.a +##----- Become must be setuid root ------------------------------------------ + +install-exec-hook: + become_prog=$(DESTDIR)/${bindir}/`echo become|sed '${transform}'`; \ + { chown root $${become_prog} && \ + chmod 4755 $${become_prog}; } || \ + { echo ">>>>>"; \ + echo ">>>>> $${become_prog} must be installed setuid-root"; \ + echo ">>>>>"; \ + } ##----- Testing ------------------------------------------------------------- ## --- The test programs --- -TESTS = \ - name-test sym-test userdb-test netg-test \ - crypt-test \ - blowfish-test idea-test md5-test +TESTS = name-test netg-test userdb-test ## --- How to build a test rig --- SUFFIXES = .tro .c.tro: - $(COMPILE) -DTEST_RIG $< -o $@ + $(COMPILE) -DTEST_RIG $< -c -o $@ ## --- Now build all the test programs --- ## ## This is a right pain. However, `automake' provides no way of automating ## this. (A drop-out to raw perl would be nice, for example.) -name-test: name.tro libbcm.a - $(LINK) name.tro libbcm.a $(LIBS) -sym-test: sym.tro libbcm.a - $(LINK) sym.tro libbcm.a $(LIBS) -userdb-test: userdb.tro libbcm.a - $(LINK) userdb.tro libbcm.a $(LIBS) -crypt-test: crypt.tro libbcm.a - $(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 - $(LINK) netg.tro libbcm.a +name-test: name.tro libbecome.a + $(LINK) name.tro libbecome.a $(LIBS) +userdb-test: userdb.tro libbecome.a + $(LINK) userdb.tro libbecome.a $(LIBS) +netg-test: netg.tro libbecome.a + $(LINK) netg.tro libbecome.a $(LIBS) + +CLEANFILES = *.tro y.output ##----- That's all, folks ---------------------------------------------------