- First setup for autoconf tools.

This commit is contained in:
ccremers 2004-05-21 13:19:43 +00:00
parent 0254565db4
commit b976611458
3 changed files with 37 additions and 86 deletions

View File

@ -1,86 +0,0 @@
#
# Scyther Makefile
#
#
# DEBUG or optimization settings: uncomment a single line:
#
CFLAGS = -g3 -D DEBUG # default usage, for e.g. with valgrind
#CFLAGS = -g3 -D DEBUG -pg # for code profiling with gprof
#CFLAGS = -O3 -static -finline-functions -fomit-frame-pointer
#
# Compiler and linkage
#
CC = gcc
# Note that these paths must include the path to the argtable library.
CPPFLAGS = -I/scratch/ccremers/include -I/usr/local/include -Wall
LDFLAGS = -L/scratch/ccremers/lib -L/usr/local/lib
LOADLIBS = -lfl
LDLIBS = -largtable2
OPTIONS = ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}
#
# Module set for the modelchecker
#
MODULES=memory.o terms.o termlists.o symbols.o knowledge.o runs.o modelchecker.o \
report.o debug.o mgu.o substitutions.o \
match_basic.o \
match_clp.o constraints.o \
output.o latex.o \
varbuf.o tracebuf.o attackminimize.o \
tac.o parser.o compiler.o
#
# Dependencies
#
MODELCHECKER = ${MODULES} main.o
all: scyther tags
${Target}.o: ${Target}.c
$(CC) $(OPTIONS) ${Target}.c -c
scanner.c: scanner.lex
flex scanner.lex
cp lex.yy.c scanner.c
tok.h: parser.c
parser.c: parser.y
bison -d -v parser.y
cp parser.tab.c parser.c
cmp -s parser.tab.h tok.h || cp parser.tab.h tok.h
tags: *.c *.h
ctags *.c *.h
modules: $(MODULES)
scyther: scanner.o $(MODELCHECKER)
$(CC) $(OPTIONS) $(MODELCHECKER) -o scyther $(LOADLIBS) $(LDLIBS)
ptestmain.o scanner.o : tok.h
#
# Cleanup
#
clean:
rm -f *.o
rm -f scyther
rm -f scanner.c
rm -f parser.c
rm -f tok.h
#
# Clean and rebuild: 'make new'
#
new:
make clean
make all
#
# Make doxygen reference manuals. (in ../refman)
#
refman: doxyconfig
doxygen doxyconfig

17
src/Makefile.am Normal file
View File

@ -0,0 +1,17 @@
CC = @CC@
VERSION = @VERSION@
AM_CFLAGS = @CFLAGS@
bin_PROGRAMS = scyther
scyther_SOURCES = main.c \
memory.c terms.c termlists.c symbols.c \
knowledge.c runs.c modelchecker.c \
report.c debug.c mgu.c substitutions.c \
match_basic.c match_clp.c constraints.c \
output.c latex.c varbuf.c tracebuf.c \
attackminimize.c tac.c \
compiler.c \
scanner.lex parser.y
scyther_LDADD = @LEXLIB@

20
src/configure.in Normal file
View File

@ -0,0 +1,20 @@
AC_INIT(main.c)
AM_INIT_AUTOMAKE(Scyther, 0.2)
dnl find and test the C compiler
AC_PROG_CC
AC_LANG_C
AC_PROG_MAKE_SET
AC_HEADER_STDC
AC_CHECK_FUNC(atol,,AC_MSG_ERROR(oops! no atol ?!?))
AC_CHECK_LIB(argtable2, arg_parse,,AC_MSG_ERROR(Scyther requires the argtable2 package))
AC_PROG_YACC
AC_PROG_LEX
VERSION="0.0.1"
AC_SUBST(VERSION)
dnl read Makefile.in and write Makefile
AC_OUTPUT(Makefile)