-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (42 loc) · 1.28 KB
/
Makefile
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
# directory paths, relative to this directory:
XPL = ./lib/xpl/code
NGP = ./lib/ngaro-pas/src
GEN = ./gen
PPU = $(GEN)
EXE = $(GEN)
RETROPATH = ./lib/retro
NGAROTEST = $(RETROPATH)/test/ngaro/ngarotest.py
# ROOT should be path back to this directory from GEN
ROOT = ../
# compiler paths
FPC = fpc -gl -B -Fu$(XPL) -Fi$(XPL) -FE$(GEN)
PYTHON = python
#------------------------------------------------------
targets:
@echo 'available targets:'
@echo '--------------------------'
@echo 'make build -> build ./gen/retro'
@echo 'make retro -> build and run ./gen/retro'
@echo 'make test -> run all tests'
@echo
@echo for grammar engine, cd ./pre
retro : build
cd $(GEN); ./retro
build : init $(NGP)/*.pas
@$(FPC) $(NGP)/retro.pas
init :
@mkdir -p $(GEN)
@rm -f $(GEN)/library $(GEN)/retroImage
@git submodule init
@git submodule update
@ln -s $(RETROPATH)/library $(GEN)/library
@ln -n $(RETROPATH)/retroImage $(GEN)/retroImage
test: test.ngaro test.core test.files. test.clean
test.ngaro : init
cd $(GEN); $(PYTHON) $(ROOT)$(NGAROTEST) -n ./retro
test.files : init
cd $(GEN); ./retro --with $(ROOT)$(RETROPATH)/test/files.rx
test.core : init
cd $(GEN); ./retro --with $(ROOT)$(RETROPATH)/test/core.rx
test.clean : init
cd $(GEN); rm -f *.img