examples/d/calc/Makefile
raw| 1 | # This Makefile is designed to be simple and readable. It does not |
| 2 | # aim at portability. It requires GNU Make. |
| 3 | |
| 4 | BISON = bison |
| 5 | DC = dmd |
| 6 | |
| 7 | all: calc |
| 8 | |
| 9 | %.d %.html %.gv: %.y |
| 10 | $(BISON) $(BISONFLAGS) --html --graph -o $*.d $< |
| 11 | |
| 12 | %: %.d |
| 13 | $(DC) $(DCFLAGS) $< |
| 14 | |
| 15 | run: calc |
| 16 | @echo "Type arithmetic expressions. Quit with ctrl-d." |
| 17 | ./$< |
| 18 | |
| 19 | clean: |
| 20 | rm -f calc calc.d calc.xml calc.gv calc.html *.o |