Makefile.am 2.32 KB
Newer Older
Benoit Perrot's avatar
Benoit Perrot committed
1
2
3
include $(srcdir)/nodes.mk

BUILT_SOURCES =								\
4
5
6
	$(FROM_NODES_GEN_PY) nodes.stamp				\
	program_builder.hh program_builder.hh.stamp			\
	program_solver.hh program_solver.cc program_solver.stamp
Benoit Perrot's avatar
Benoit Perrot committed
7
8
9
10

# This code comes from "Handling Tools that Produce Many Outputs",
# from the Automake documentation.

11
12
13
EXTRA_DIST = $(srcdir)/nodes.mk.gen.py
nodes.mk: $(srcdir)/nodes.mk.gen.py $(top_srcdir)/dev/nolimips.xml
	PYTHONPATH="$(top_srcdir)/dev/:$$PYTHONPATH" $(srcdir)/nodes.mk.gen.py < $(top_srcdir)/dev/nolimips.xml >$@.tmp
Benoit Perrot's avatar
Benoit Perrot committed
14
15
	mv -f $@.tmp $@

16
17
EXTRA_DIST += $(srcdir)/nodes.gen.py
nodes.stamp: $(srcdir)/nodes.gen.py $(top_srcdir)/dev/nolimips.xml
Benoit Perrot's avatar
Benoit Perrot committed
18
19
	@rm -rf $@.tmp
	@touch $@.tmp
20
	PYTHONPATH="$(top_srcdir)/dev/:$$PYTHONPATH" $(srcdir)/nodes.gen.py $(srcdir) < $(top_srcdir)/dev/nolimips.xml
Benoit Perrot's avatar
Benoit Perrot committed
21
	@mv -f $@.tmp $@
22
$(FROM_NODES_GEN_PY): nodes.stamp
Benoit Perrot's avatar
Benoit Perrot committed
23

24
25
EXTRA_DIST += $(srcdir)/program_builder.hh.gen.py
program_builder.hh.stamp: $(srcdir)/program_builder.hh.gen.py $(top_srcdir)/dev/nolimips.xml
Benoit Perrot's avatar
Benoit Perrot committed
26
27
	@rm -rf $@.tmp
	@touch $@.tmp
28
	PYTHONPATH="$(top_srcdir)/dev/:$$PYTHONPATH" $(srcdir)/program_builder.hh.gen.py $(srcdir) < $(top_srcdir)/dev/nolimips.xml
Benoit Perrot's avatar
Benoit Perrot committed
29
	@mv -f $@.tmp $@
30
program_builder.hh: program_builder.hh.stamp
Benoit Perrot's avatar
Benoit Perrot committed
31

32
33
EXTRA_DIST += $(srcdir)/program_solver.gen.py
program_solver.stamp: $(srcdir)/program_solver.gen.py $(top_srcdir)/dev/nolimips.xml
Benoit Perrot's avatar
Benoit Perrot committed
34
35
	@rm -rf $@.tmp
	@touch $@.tmp
36
	PYTHONPATH="$(top_srcdir)/dev/:$$PYTHONPATH" $(srcdir)/program_solver.gen.py $(srcdir) < $(top_srcdir)/dev/nolimips.xml
Benoit Perrot's avatar
Benoit Perrot committed
37
	@mv -f $@.tmp $@
38
program_solver.hh program_solver.cc: program_solver.stamp
Benoit Perrot's avatar
Benoit Perrot committed
39
40


41
42
43
MAINTAINERCLEANFILES =						\
	$(FROM_NODES_GEN_PY)					\
	program_builder.hh					\
Benoit Perrot's avatar
Benoit Perrot committed
44
45
46
	program_solver.hh program_solver.cc

noinst_LIBRARIES = libinst.a
Benoit Perrot's avatar
Benoit Perrot committed
47
48

libinst_a_CPPFLAGS = -I $(top_srcdir)/lib -I $(top_srcdir)/src -I $(top_builddir)/src
Benoit Perrot's avatar
Benoit Perrot committed
49
libinst_a_SOURCES =							\
50
	$(FROM_NODES_GEN_PY) nodes.stamp				\
Benoit Perrot's avatar
Benoit Perrot committed
51
52
	register.hh							\
	exp.hh exp.cc							\
53
54
55
	  int_exp.hh int_exp.cc						\
	  label_exp.hh label_exp.cc					\
	  op_exp.hh op_exp.cc						\
Benoit Perrot's avatar
Benoit Perrot committed
56
57
58
59
	exp-visitor.hh							\
	inst.hh								\
	program.hh							\
	label.hh label.cc						\
60
	text_label.hh							\
61
        section.hh section.cc						\
Benoit Perrot's avatar
Benoit Perrot committed
62
63
64
	text_section.hh	text_section.cc					\
	data_section.hh data_section.cc					\
	program.hh							\
65
66
	program_builder.hh program_builder.cc program_builder.hh.stamp	\
	program_solver.hh program_solver.cc program_solver.stamp