-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.Racket
55 lines (32 loc) · 1.13 KB
/
Makefile.Racket
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
# example of Makefile for Scheme+ for Racket
# Makefile for back-propagation program
# author: Damien Mattei
# program to build
MYPROGRAM=exo_retropropagationNhidden_layers_matrix_v2_by_vectors+.rkt
# path to SRFI-105 directory
SRFI-105=../SRFI-105-for-Racket
# for MacOS:
#SCHEME_EXEC=/Applications/Racket\ v8.12/bin/racket
SCHEME_EXEC=racket
# Scheme+ for parser
#PARSER:=$(SCHEME_EXEC) $(SCHEME_PLUS)/src/curly-infix2prefix4racket.rkt
PARSER:=$(SRFI-105)/src/curly-infix2prefix4racket.rkt
# parsed program name
PROGRAM_PARSED=exo_retropropagationNhidden_layers_matrix_v2_by_vectors.rkt
# files that are simply included in source code
INCLUDED_FILES=matrix-by-vectors.rkt
# files to parse
OBJECT= $(PROGRAM_PARSED) $(INCLUDED_FILES)
# create directory, build objects
# note: object modules have the same name than module source but are in different directories
all: $(OBJECT)
# create Scheme files (*.scm) by parsing Scheme+ files (*+.scm)
%.scm: %+.scm
@echo PARSING $< :
$(PARSER) $< > $@
# create Scheme files (*.rkt) by parsing Scheme+ files (*+.rkt)
%.rkt: %+.rkt
@echo PARSING $< :
$(PARSER) $< > $@
clean:
rm -rf $(OBJECT)