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