summaryrefslogtreecommitdiffstats
path: root/Makefile.am
blob: a8d7d9f1d475a804686a93ed591d405250e4f5cf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# vim: set sw=8 ts=8 sts=8 noet:

NULL =

EXTRA_DIST =                \
    autogen.sh          \
    Makefile.simple         \
    pattern/int-div-by-zero.cmm \
    pattern/negative-array-size.cmm \
    pattern/not-constant.cmm    \
    pattern/not-function.cmm    \
    pattern/not-scalar-or-array.cmm \
    pattern/not-type.cmm        \
    pattern/not-var.cmm     \
    pattern/should-pass.cmm     \
    pattern/string-expr.cmm     \
    pattern/void-expr.cmm       \
    pattern/void-var-and-array.cmm  \
    $(NULL)

bin_PROGRAMS = parser
noinst_LIBRARIES = libparser.a

AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_builddir)/src
AM_YFLAGS = -d

parser_CFLAGS = $(WARN_CFLAGS)
parser_SOURCES =        \
    src/main.c      \
    src/common.h        \
    src/ast.h       \
    src/ast.c       \
    src/code-generation.h   \
    src/code-generation.c   \
    src/draw.h      \
    src/draw.c      \
    src/register.h      \
    src/register.c      \
    src/semantic-analysis.h \
    src/semantic-analysis.c \
    src/state.h     \
    src/state.c     \
    src/symbol-table.h  \
    src/symbol-table.c  \
    $(NULL)
parser_LDADD =          \
    libparser.a     \
    $(NULL)

libparser_a_SOURCES =       \
    src/lexer.l     \
    src/parser.y        \
    $(NULL)

BUILT_SOURCES =         \
    src/lexer.c     \
    src/parser.h        \
    $(NULL)

submit_dir_name = hw
submit_tarball_prefix = b01902054_b01902062
submit: dist
    tar -zxf $(DIST_ARCHIVES)
    mv $(distdir) $(submit_dir_name)
    cp -a $(submit_dir_name)/Makefile.simple $(submit_dir_name)/Makefile
    rm $(submit_dir_name)/src/lexer.c
    rm $(submit_dir_name)/src/parser.h
    rm $(submit_dir_name)/src/parser.c
    ver=`git rev-list HEAD | wc -l` && tar -jpcf \
        $(submit_tarball_prefix)_ver$$ver.tar.bz2 $(submit_dir_name)
    rm -rf $(submit_dir_name)