Merged blowfish branch into trunk.
[become] / src / Makefile.am
1 ## Process this file with `automake' to generate `Makefile.in'
2 ## -*-makefile-*-
3 ##
4 ## $Id: Makefile.am,v 1.7 1997/09/26 09:14:57 mdw Exp $
5 ##
6 ## Makefile for `become'
7 ##
8 ## (c) 1997 EBI
9 ##
10
11 ##----- Licensing notice ----------------------------------------------------
12 ##
13 ## This file is part of `become'
14 ##
15 ## `Become' is free software; you can redistribute it and/or modify
16 ## it under the terms of the GNU General Public License as published by
17 ## the Free Software Foundation; either version 2 of the License, or
18 ## (at your option) any later version.
19 ##
20 ## `Become' is distributed in the hope that it will be useful,
21 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
22 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ## GNU General Public License for more details.
24 ##
25 ## You should have received a copy of the GNU General Public License
26 ## along with `become'; if not, write to the Free Software Foundation,
27 ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28
29 ##----- Revision history ----------------------------------------------------
30 ##
31 ## $Log: Makefile.am,v $
32 ## Revision 1.7 1997/09/26 09:14:57 mdw
33 ## Merged blowfish branch into trunk.
34 ##
35 ## Revision 1.6.2.1 1997/09/26 09:07:56 mdw
36 ## Use the Blowfish encryption algorithm instead of IDEA. This is partly
37 ## because I prefer Blowfish (without any particularly strong evidence) but
38 ## mainly because IDEA is patented and Blowfish isn't.
39 ##
40 ## Revision 1.6 1997/09/18 11:17:18 mdw
41 ## Fix comment leaders. Don't know why this CVS keeps breaking them.
42 ## Could be DEC's bogus version of RCS being picked up.
43 ##
44 ## Revision 1.5 1997/09/17 10:28:25 mdw
45 ## Remove `set.c'. No longer necessary.
46 ##
47 ## Revision 1.4 1997/08/20 16:14:12 mdw
48 ## Build parser and lexer into the source directory. Other cosmetic
49 ## things.
50 ##
51 ## Revision 1.3 1997/08/07 09:39:36 mdw
52 ## Add new source files, and remove options inappropriate for subsidiary
53 ## Makefiles.
54 ##
55 ## Revision 1.2 1997/08/04 10:24:19 mdw
56 ## Sources placed under CVS control.
57 ##
58
59 ##----- General setup things ------------------------------------------------
60
61 ## --- What to make ---
62
63 bin_PROGRAMS = become keygen
64 noinst_LIBRARIES = bcm
65
66 ##----- Building the main code ----------------------------------------------
67
68 ## --- The library contains most of the interesting stuff ---
69
70 bcm_SOURCES = \
71 check.c daemon.c \
72 lexer.l parser.y \
73 class.c name.c netg.c rule.c sym.c userdb.c \
74 crypt.c \
75 noise.c rand.c \
76 icrypt.c blowfish.c md5.c \
77 mdwopt.c tx.c utils.c \
78 \
79 become.h \
80 check.h daemon.h \
81 lexer.h parser.h \
82 class.h name.h netg.h rule.h sym.h userdb.h \
83 crypt.h \
84 noise.h rand.h \
85 icrypt.h blowfish.h blowfish-sbox.h md5.h \
86 mdwopt.h tx.h utils.h \
87 dbutils.h
88
89 BUILT_SOURCES = \
90 parser.c lexer.c parser.tab.h
91
92 ## --- Yaccing and lexing ---
93
94 $(srcdir)/parser.c $(srcdir)/parser.tab.h: $(srcdir)/parser.y
95 @YACC@ -d -v $(srcdir)/parser.y
96 mv y.tab.c $(srcdir)/parser.c
97 mv y.tab.h $(srcdir)/parser.tab.h
98
99 $(srcdir)/lexer.c: $(srcdir)/lexer.l
100 @LEX@ $(srcdir)/lexer.l
101 mv lex.yy.c $(srcdir)/lexer.c
102
103 ## --- The main programs ---
104
105 LDADD = libbcm.a @LEXLIB@
106
107 become_SOURCES = become.c
108 keygen_SOURCES = keygen.c
109
110 become_DEPENDENCIES = libbcm.a
111 keygen_DEPENDENCIES = libbcm.a
112
113 ##----- Testing -------------------------------------------------------------
114
115 ## --- The test programs ---
116
117 TESTS = \
118 name-test netg-test sym-test userdb-test \
119 crypt-test \
120 blowfish-test idea-test md5-test
121
122 ## --- How to build a test rig ---
123
124 SUFFIXES = .tro
125 .c.tro:
126 $(COMPILE) -DTEST_RIG $< -o $@
127
128 ## --- Now build all the test programs ---
129 ##
130 ## This is a right pain. However, `automake' provides no way of automating
131 ## this. (A drop-out to raw perl would be nice, for example.)
132
133 name-test: name.tro libbcm.a
134 $(LINK) name.tro libbcm.a $(LIBS)
135 sym-test: sym.tro libbcm.a
136 $(LINK) sym.tro libbcm.a $(LIBS)
137 userdb-test: userdb.tro libbcm.a
138 $(LINK) userdb.tro libbcm.a $(LIBS)
139 crypt-test: crypt.tro libbcm.a
140 $(LINK) crypt.tro libbcm.a $(LIBS)
141 blowfish-test: blowfish.tro libbcm.a
142 $(LINK) blowfish.tro libbcm.a $(LIBS)
143 idea-test: idea.tro libbcm.a
144 $(LINK) idea.tro libbcm.a $(LIBS)
145 md5-test: md5.tro libbcm.a
146 $(LINK) md5.tro libbcm.a $(LIBS)
147 netg-test: netg.tro libbcm.a
148 $(LINK) netg.tro libbcm.a
149
150 CLEANFILES = *.tro y.output
151
152 ##----- That's all, folks ---------------------------------------------------