8ddbfc62 |
1 | ## Process this file with `automake' to generate `Makefile.in' |
2 | ## -*-makefile-*- |
3 | ## |
705e795a |
4 | ## $Id: Makefile.am,v 1.11 1998/06/18 15:52:05 mdw Exp $ |
8ddbfc62 |
5 | ## |
6 | ## Makefile for `become' |
7 | ## |
c758e654 |
8 | ## (c) 1998 EBI |
8ddbfc62 |
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 $ |
705e795a |
32 | ## Revision 1.11 1998/06/18 15:52:05 mdw |
33 | ## Remove the IDEA test case. |
34 | ## |
4710b942 |
35 | ## Revision 1.10 1998/04/23 13:17:17 mdw |
36 | ## New program `bcquery', and `ypstuff' module added. |
37 | ## |
5b175cbb |
38 | ## Revision 1.9 1998/02/20 18:12:35 mdw |
39 | ## Make the `become' program setuid root when installing. |
40 | ## |
c758e654 |
41 | ## Revision 1.8 1998/01/12 16:45:36 mdw |
42 | ## Fix copyright date. |
43 | ## |
9e5602f0 |
44 | ## Revision 1.7 1997/09/26 09:14:57 mdw |
45 | ## Merged blowfish branch into trunk. |
46 | ## |
47 | ## Revision 1.6.2.1 1997/09/26 09:07:56 mdw |
48 | ## Use the Blowfish encryption algorithm instead of IDEA. This is partly |
49 | ## because I prefer Blowfish (without any particularly strong evidence) but |
50 | ## mainly because IDEA is patented and Blowfish isn't. |
51 | ## |
07d8362a |
52 | ## Revision 1.6 1997/09/18 11:17:18 mdw |
53 | ## Fix comment leaders. Don't know why this CVS keeps breaking them. |
54 | ## Could be DEC's bogus version of RCS being picked up. |
55 | ## |
56 | ## Revision 1.5 1997/09/17 10:28:25 mdw |
c426c3c9 |
57 | ## Remove `set.c'. No longer necessary. |
0d036225 |
58 | ## |
07d8362a |
59 | ## Revision 1.4 1997/08/20 16:14:12 mdw |
60 | ## Build parser and lexer into the source directory. Other cosmetic |
61 | ## things. |
62 | ## |
a68d9c21 |
63 | ## Revision 1.3 1997/08/07 09:39:36 mdw |
64 | ## Add new source files, and remove options inappropriate for subsidiary |
65 | ## Makefiles. |
66 | ## |
03f996bd |
67 | ## Revision 1.2 1997/08/04 10:24:19 mdw |
8ddbfc62 |
68 | ## Sources placed under CVS control. |
69 | ## |
70 | |
71 | ##----- General setup things ------------------------------------------------ |
72 | |
8ddbfc62 |
73 | ## --- What to make --- |
74 | |
4710b942 |
75 | bin_PROGRAMS = become keygen bcquery |
8ddbfc62 |
76 | noinst_LIBRARIES = bcm |
77 | |
78 | ##----- Building the main code ---------------------------------------------- |
79 | |
80 | ## --- The library contains most of the interesting stuff --- |
81 | |
82 | bcm_SOURCES = \ |
83 | check.c daemon.c \ |
84 | lexer.l parser.y \ |
4710b942 |
85 | class.c name.c netg.c rule.c sym.c userdb.c ypstuff.c \ |
8ddbfc62 |
86 | crypt.c \ |
87 | noise.c rand.c \ |
9e5602f0 |
88 | icrypt.c blowfish.c md5.c \ |
8ddbfc62 |
89 | mdwopt.c tx.c utils.c \ |
90 | \ |
91 | become.h \ |
92 | check.h daemon.h \ |
93 | lexer.h parser.h \ |
4710b942 |
94 | class.h name.h netg.h rule.h sym.h userdb.h ypstuff.h \ |
8ddbfc62 |
95 | crypt.h \ |
96 | noise.h rand.h \ |
9e5602f0 |
97 | icrypt.h blowfish.h blowfish-sbox.h md5.h \ |
a68d9c21 |
98 | mdwopt.h tx.h utils.h \ |
99 | dbutils.h |
8ddbfc62 |
100 | |
101 | BUILT_SOURCES = \ |
102 | parser.c lexer.c parser.tab.h |
103 | |
104 | ## --- Yaccing and lexing --- |
105 | |
0d036225 |
106 | $(srcdir)/parser.c $(srcdir)/parser.tab.h: $(srcdir)/parser.y |
8ddbfc62 |
107 | @YACC@ -d -v $(srcdir)/parser.y |
0d036225 |
108 | mv y.tab.c $(srcdir)/parser.c |
109 | mv y.tab.h $(srcdir)/parser.tab.h |
8ddbfc62 |
110 | |
0d036225 |
111 | $(srcdir)/lexer.c: $(srcdir)/lexer.l |
8ddbfc62 |
112 | @LEX@ $(srcdir)/lexer.l |
0d036225 |
113 | mv lex.yy.c $(srcdir)/lexer.c |
8ddbfc62 |
114 | |
115 | ## --- The main programs --- |
116 | |
a68d9c21 |
117 | LDADD = libbcm.a @LEXLIB@ |
0d036225 |
118 | |
8ddbfc62 |
119 | become_SOURCES = become.c |
120 | keygen_SOURCES = keygen.c |
4710b942 |
121 | bcquery_SOURCES = bcquery.c |
8ddbfc62 |
122 | |
0d036225 |
123 | become_DEPENDENCIES = libbcm.a |
124 | keygen_DEPENDENCIES = libbcm.a |
4710b942 |
125 | bcquery_DEPENDENCIES = libbcm.a |
8ddbfc62 |
126 | |
5b175cbb |
127 | ##----- Become must be setuid root ------------------------------------------ |
128 | |
129 | install-data-hook: |
130 | become_prog=${bindir}/`echo become|sed '${transform}'`; \ |
131 | { chown root $${become_prog} && \ |
132 | chmod 4755 $${become_prog}; } || \ |
133 | { echo ">>>>>"; \ |
134 | echo ">>>>> $${become_prog} must be installed setuid-root"; \ |
135 | echo ">>>>>"; \ |
136 | } |
137 | |
8ddbfc62 |
138 | ##----- Testing ------------------------------------------------------------- |
139 | |
140 | ## --- The test programs --- |
141 | |
142 | TESTS = \ |
a68d9c21 |
143 | name-test netg-test sym-test userdb-test \ |
8ddbfc62 |
144 | crypt-test \ |
145 | blowfish-test idea-test md5-test |
146 | |
147 | ## --- How to build a test rig --- |
148 | |
149 | SUFFIXES = .tro |
150 | .c.tro: |
151 | $(COMPILE) -DTEST_RIG $< -o $@ |
152 | |
153 | ## --- Now build all the test programs --- |
154 | ## |
155 | ## This is a right pain. However, `automake' provides no way of automating |
156 | ## this. (A drop-out to raw perl would be nice, for example.) |
157 | |
158 | name-test: name.tro libbcm.a |
159 | $(LINK) name.tro libbcm.a $(LIBS) |
160 | sym-test: sym.tro libbcm.a |
161 | $(LINK) sym.tro libbcm.a $(LIBS) |
162 | userdb-test: userdb.tro libbcm.a |
163 | $(LINK) userdb.tro libbcm.a $(LIBS) |
164 | crypt-test: crypt.tro libbcm.a |
165 | $(LINK) crypt.tro libbcm.a $(LIBS) |
166 | blowfish-test: blowfish.tro libbcm.a |
167 | $(LINK) blowfish.tro libbcm.a $(LIBS) |
8ddbfc62 |
168 | md5-test: md5.tro libbcm.a |
169 | $(LINK) md5.tro libbcm.a $(LIBS) |
170 | netg-test: netg.tro libbcm.a |
171 | $(LINK) netg.tro libbcm.a |
172 | |
0d036225 |
173 | CLEANFILES = *.tro y.output |
174 | |
8ddbfc62 |
175 | ##----- That's all, folks --------------------------------------------------- |