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