aboutsummaryrefslogtreecommitdiffstats
path: root/src/edif/Makefile
blob: e7e449483d82804d5f27519f5583a646a56b9c38 (plain)
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
GNATMAKE=gnatmake -j0
CFLAGS=-g
GNAT_FLAGS=-aI.. -aI../vhdl -aI../psl -aI../grt -gnat05 -gnaty3befhkmr -gnata -gnatf -gnatwae $(CFLAGS)
BE=debug
ortho_srcdir=../ortho
GEN_SRCS=edif-nodes.adb edif-nodes_meta.ads edif-nodes_meta.adb
CC=gcc

PNODES=../../scripts/pnodes.py
PNODES_ARGS=--field-file=edif-nodes.adb.in \
  --kind-file=edif-nodes.ads \
  --node-file=edif-nodes.ads \
  --template-file=edif-nodes.adb.in \
  --meta-basename=edif-nodes_meta \
  --kind-type=Nkind \
  --kind-range-prefix=Nkinds_ \
  --kind-prefix=N_ \
  --node-type=Node

all: dump_edif


dump_edif$(EXEEXT): $(GEN_SRCS) force
	$(GNATMAKE) $(GNAT_FLAGS) dump_edif

edif-nodes.adb: edif-nodes.adb.in edif-nodes.ads $(PNODES)
	$(RM) -f $@
	$(PNODES) $(PNODES_ARGS) body > $@
	chmod a-w $@

edif-nodes_meta.ads: edif-nodes_meta.ads.in edif-nodes.ads $(PNODES)
	$(RM) -f $@
	$(PNODES) $(PNODES_ARGS) meta_specs > $@
	chmod a-w $@

edif-nodes_meta.adb: edif-nodes_meta.adb.in edif-nodes.ads $(PNODES)
	$(RM) -f $@
	$(PNODES) $(PNODES_ARGS) --keep-order meta_body > $@
	chmod a-w $@

clean: force
	$(RM) -f *.o *.ali dump_edif  *.cf b~*.ad?

maintainer-clean: clean
	$(RM) -f $(GEN_SRCS)

force: