Build parser and lexer into the source directory. Other cosmetic
[become] / src / Makefile.am
CommitLineData
8ddbfc62 1## Process this file with `automake' to generate `Makefile.in'
2## -*-makefile-*-
3##
0d036225 4## $Id: Makefile.am,v 1.4 1997/08/20 16:14:12 mdw Exp $
8ddbfc62 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 $
0d036225 32## Revision 1.4 1997/08/20 16:14:12 mdw
33## Build parser and lexer into the source directory. Other cosmetic
34## things.
35##
a68d9c21 36## Revision 1.3 1997/08/07 09:39:36 mdw
37## Add new source files, and remove options inappropriate for subsidiary
38## Makefiles.
39##
03f996bd 40## Revision 1.2 1997/08/04 10:24:19 mdw
8ddbfc62 41## Sources placed under CVS control.
42##
43
44##----- General setup things ------------------------------------------------
45
8ddbfc62 46## --- What to make ---
47
48bin_PROGRAMS = become keygen
49noinst_LIBRARIES = bcm
50
51##----- Building the main code ----------------------------------------------
52
53## --- The library contains most of the interesting stuff ---
54
55bcm_SOURCES = \
56 check.c daemon.c \
57 lexer.l parser.y \
a68d9c21 58 class.c name.c netg.c rule.c set.c sym.c userdb.c \
8ddbfc62 59 crypt.c \
60 noise.c rand.c \
61 icrypt.c idea.c md5.c \
62 mdwopt.c tx.c utils.c \
63 \
64 become.h \
65 check.h daemon.h \
66 lexer.h parser.h \
a68d9c21 67 class.h name.h netg.h rule.h set.h sym.h userdb.h \
8ddbfc62 68 crypt.h \
69 noise.h rand.h \
70 icrypt.h idea.h md5.h \
a68d9c21 71 mdwopt.h tx.h utils.h \
72 dbutils.h
8ddbfc62 73
74BUILT_SOURCES = \
75 parser.c lexer.c parser.tab.h
76
77## --- Yaccing and lexing ---
78
0d036225 79$(srcdir)/parser.c $(srcdir)/parser.tab.h: $(srcdir)/parser.y
8ddbfc62 80 @YACC@ -d -v $(srcdir)/parser.y
0d036225 81 mv y.tab.c $(srcdir)/parser.c
82 mv y.tab.h $(srcdir)/parser.tab.h
8ddbfc62 83
0d036225 84$(srcdir)/lexer.c: $(srcdir)/lexer.l
8ddbfc62 85 @LEX@ $(srcdir)/lexer.l
0d036225 86 mv lex.yy.c $(srcdir)/lexer.c
8ddbfc62 87
88## --- The main programs ---
89
a68d9c21 90LDADD = libbcm.a @LEXLIB@
0d036225 91
8ddbfc62 92become_SOURCES = become.c
93keygen_SOURCES = keygen.c
94
0d036225 95become_DEPENDENCIES = libbcm.a
96keygen_DEPENDENCIES = libbcm.a
8ddbfc62 97
98##----- Testing -------------------------------------------------------------
99
100## --- The test programs ---
101
102TESTS = \
a68d9c21 103 name-test netg-test sym-test userdb-test \
8ddbfc62 104 crypt-test \
105 blowfish-test idea-test md5-test
106
107## --- How to build a test rig ---
108
109SUFFIXES = .tro
110.c.tro:
111 $(COMPILE) -DTEST_RIG $< -o $@
112
113## --- Now build all the test programs ---
114##
115## This is a right pain. However, `automake' provides no way of automating
116## this. (A drop-out to raw perl would be nice, for example.)
117
118name-test: name.tro libbcm.a
119 $(LINK) name.tro libbcm.a $(LIBS)
120sym-test: sym.tro libbcm.a
121 $(LINK) sym.tro libbcm.a $(LIBS)
122userdb-test: userdb.tro libbcm.a
123 $(LINK) userdb.tro libbcm.a $(LIBS)
124crypt-test: crypt.tro libbcm.a
125 $(LINK) crypt.tro libbcm.a $(LIBS)
126blowfish-test: blowfish.tro libbcm.a
127 $(LINK) blowfish.tro libbcm.a $(LIBS)
128idea-test: idea.tro libbcm.a
129 $(LINK) idea.tro libbcm.a $(LIBS)
130md5-test: md5.tro libbcm.a
131 $(LINK) md5.tro libbcm.a $(LIBS)
132netg-test: netg.tro libbcm.a
133 $(LINK) netg.tro libbcm.a
134
0d036225 135CLEANFILES = *.tro y.output
136
8ddbfc62 137##----- That's all, folks ---------------------------------------------------