# -*-makefile-*- # # $Id: Makefile.in,v 1.1 1997/07/21 13:47:55 mdw Exp $ # # Makefile for `become' # # (c) 1997 EBI # #----- Licencing notice ----------------------------------------------------- # # This file is part of `become' # # `Become' is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # `Become' is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with `become'; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #----- Revision history ----------------------------------------------------- # # $Log: Makefile.in,v $ # Revision 1.1 1997/07/21 13:47:55 mdw # Initial revision # #----- Configuration section ------------------------------------------------ # --- Miscellaneous stuff --- SHELL= /bin/sh VERSION= @VERSION@ # --- Finding source code --- srcdir= @srcdir@ VPATH= @srcdir@ # --- Where to put things --- prefix= @prefix@ exec_prefix= @exec_prefix@ bindir= @bindir@ libdir= @libdir@ etcdir= @sysconfdir@ # --- Compiling --- CC= @CC@ CFLAGS= @CFLAGS@ CPPFLAGS= @CPPFLAGS@ -I$(srcdir) -I. TEST_DEFINES= -DTEST_RIG YACC= @YACC@ YFLAGS= -d -v LEX= @LEX@ LEXFLAGS= DEPEND= gcc -MM -MG -x c # --- Linking --- LD= @CC@ LIBS= @LIBS@ @LEXLIB@ LDFLAGS= @LDFLAGS@ AR= @AR@ RANLIB= @RANLIB@ # --- Installation --- INSTALL= @INSTALL@ INSTALL_PROG= @INSTALL_PROGRAM@ INSTALL_DATA= @INSTALL_DATA@ # --- Other useful things --- SED= sed MV= mv -f RM= rm -f ETAGS= etags #----- Interesting files ---------------------------------------------------- # --- Library of common things --- BCMLIB= libbecome.a BCMLIBSRCF= idea.c md5.c icrypt.c crypt.c tx.c \ class.c name.c rule.c set.c sym.c userdb.c \ check.c daemon.c \ parser.y lexer.l \ mdwopt.c utils.c BCMLIBSRC= $(addprefix $(srcdir)/, $(BCMLIBSRCF)) BCMLIBOBJ= $(addsuffix .o, $(basename $(BCMLIBSRCF))) # --- The `become' program --- BECOME= become BECOMESRCF= become.c BECOMESRC= $(addprefix $(srcdir)/, $(BECOMESRCF)) BECOMEOBJ= $(addsuffix .o, $(basename $(BECOMESRCF))) # --- The `keygen' program --- KEYGEN= keygen KEYGENSRCF= keygen.c KEYGENSRC= $(addprefix $(srcdir)/, $(KEYGENSRCF)) KEYGENOBJ= $(addsuffix .o, $(basename $(KEYGENSRCF))) # --- Various tests for some important modules --- TESTS= crypt-test icrypt-test idea-test md5-test \ name-test sym-test userdb-test \ become-test TESTOBJ= $(addsuffix .o, $(TESTS)) # --- Everything --- ALLSRC= $(BCMLIBSRC) $(BECOMESRC) $(KEYGENSRC) ALLOBJ= $(BCMLIBOBJ) $(BCMLIB) $(BECOMEOBJ) $(KEYGENOBJ) $(TESTOBJ) # --- Generated source files --- GENSRCF= parser.c parser.tab.h lexer.c GENSRC= $(addprefix $(srcdir)/, $(GENSRCF)) # --- Installed files --- INSTALLABLES= $(bindir)/$(BECOME) $(bindir)/$(KEYGEN) #----- Parser tokens header file -------------------------------------------- %.tab.h: %.c $(MV) y.tab.h $@ #----- Main target ---------------------------------------------------------- all: $(BECOME) $(KEYGEN) #----- Compiling the code --------------------------------------------------- $(BCMLIB): $(BCMLIBOBJ) $(AR) rc $(BCMLIB) $? $(RANLIB) $(BCMLIB) $(BECOME): $(BECOMEOBJ) $(BCMLIB) $(LD) $(LDFLAGS) $^ $(LIBS) -o $(BECOME) $(KEYGEN): $(KEYGENOBJ) $(BCMLIB) $(LD) $(LDFLAGS) $^ $(LIBS) -o $(KEYGEN) #----- Installation --------------------------------------------------------- # --- Installing --- install: $(INSTALLABLES) $(bindir):; $(srcdir)/mkinstalldirs $(bindir) $(bindir)/%: % $(bindir) $(INSTALL_PROG) $< $(bindir) # --- Uninstalling --- uninstall:; $(RM) $(INSTALLABLES) #----- Environmental luxuries ----------------------------------------------- tags: $(srcdir)/TAGS $(srcdir)/TAGS: $(ALLSRC) $(ETAGS) $(ALLSRC) -o $(srcdir)/TAGS depend: $(srcdir)/depend $(srcdir)/depend: $(ALLSRC) $(SED) \ -e '/^# \[Generated dependencies]/ q' \ $(srcdir)/Makefile.in >$(srcdir)/new-Makefile.in $(DEPEND) $(ALLSRC) | \ sed -e 's/'$(srcdir)'\///g' \ >>$(srcdir)/new-Makefile.in $(MV) $(srcdir)/new-Makefile.in $(srcdir)/Makefile.in touch $(srcdir)/depend #----- Distribution building ------------------------------------------------ dist: $(GENSRC) $(srcdir)/mkdist -p $(BECOME) -v $(VERSION) \ -m $(srcdir)/MANIFEST -i $(srcdir) #----- Cleanliness ---------------------------------------------------------- mostlyclean:; $(RM) \ $(BECOME) $(KEYGEN) $(TESTS) $(ALLOBJ) \ y.output \ $(srcdir)/core $(srcdir)/\#* $(srcdir)/*~ core \#* ~* clean: mostlyclean distclean: clean $(RM) Makefile \ config.status config.cache config.h config.log maintainer-clean: distclean $(RM) $(srcdir)/TAGS $(srcdir)/depend $(GENSRC) \ #----- Test rigs for various pieces of code --------------------------------- test: $(TESTS) %-test.o: %.c config.h $(CC) $(CFLAGS) $(CPPFLAGS) $(TEST_DEFINES) -c $< -o $@ %-test: %-test.o $(BCMLIB) $(LD) $(LDFLAGS) $^ $(LIBS) -o $@ #----- Administrivia -------------------------------------------------------- .PHONY: all tags install instdirs uninstall tests depend \ mostlyclean clean distclean maintainer-clean #----- Automatic dependencies ----------------------------------------------- # # [Generated dependencies] idea.o: idea.c config.h idea.h config.h utils.h md5.o: md5.c config.h md5.h config.h utils.h icrypt.o: icrypt.c config.h icrypt.h config.h idea.h config.h crypt.o: crypt.c config.h crypt.h become.h config.h config.h \ icrypt.h config.h idea.h config.h md5.h config.h tx.h \ utils.h tx.o: tx.c config.h tx.h class.o: class.c class.h sym.h set.h utils.h name.o: name.c class.h sym.h name.h userdb.h utils.h rule.o: rule.c become.h config.h class.h sym.h rule.h \ utils.h set.o: set.c set.h sym.h utils.h sym.o: sym.c sym.h utils.h userdb.o: userdb.c config.h sym.h userdb.h utils.h check.o: check.c become.h config.h config.h crypt.h config.h \ idea.h config.h lexer.h name.h class.h sym.h rule.h \ parser.h parser.tab.h tx.h utils.h daemon.o: daemon.c become.h config.h config.h crypt.h \ config.h daemon.h idea.h config.h lexer.h name.h \ class.h sym.h parser.h parser.tab.h rule.h tx.h \ userdb.h utils.h parser.y.o: parser.y class.h sym.h daemon.h lexer.h \ name.h rule.h become.h config.h set.h userdb.h \ utils.h lexer.l.o: lexer.l become.h config.h lexer.h parser.h \ class.h sym.h name.h parser.tab.h utils.h mdwopt.o: mdwopt.c mdwopt.h utils.o: utils.c config.h utils.h become.o: become.c become.h config.h config.h check.h \ daemon.h lexer.h mdwopt.h name.h class.h sym.h \ parser.h parser.tab.h rule.h utils.h keygen.o: keygen.c config.h tx.h mdwopt.h utils.h