-
Notifications
You must be signed in to change notification settings - Fork 23
/
run
executable file
·45 lines (35 loc) · 1.74 KB
/
run
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
# from norvig http://norvig.com/lispy.html
echo "--- Lines of code (according to norvig) ---"
grep -v "^\s*//" lisp.c | grep -v "^/\*" | grep -v "^$" | wc
echo
stty sane
# for compiling 32 bit binary on 64 bit systgem
# - sudo apt-get install libc6-dev-i386
# - or http://askubuntu.com/questions/470796/fatal-error-sys-cdefs-h-no-such-file-or-directory
# -- linker option for checking memory
# http://www.embeddedrelated.com/showthread/comp.arch.embedded/45390-1.php
# assembly: -Wa,-ahlms=myfile.lst
# big picture: -Wl,-Map=myfile.map,--cref
# -- compile for LINUX
# we define UNIX for compilations for unix target
# and we cp tlisp.ccc to tlisp.c, can't keep it as tlisp.c when compiling for esp as it's macro takes all files
# use these lines when imacs integrated... look into recursive git project...
#cp tlisp.ccc tlisp.c && gcc -m32 -O2 -DUNIX=1 tlisp.c common.c httpd.c symbols.c lisp.c imacs.c -o opt ; rm tlisp.c
#cp tlisp.ccc tlisp.c && gcc -m32 -g -pg -DUNIX=1 tlisp.c common.c httpd.c symbols.c lisp.c imacs.c && time ./a.out ; rm tlisp.c
echo "--- compiling ---"
rm a.out opt esp-lisp
cp tlisp.ccc tlisp.c && gcc -m32 -g -DUNIX=1 tlisp.c common.c httpd.c symbols.c lisp.c -o esp-lisp ; rm tlisp.c
echo "--- running ---"
pushd SPIFFS
time ../esp-lisp $*
stty sane
popd
echo "--- compiling opt ---"
#cp tlisp.ccc tlisp.c && gcc -m32 -O2 -DUNIX=1 tlisp.c common.c httpd.c symbols.c lisp.c -o opt ; rm tlisp.c
###cp tlisp.ccc tlisp.c && gcc --enable-checking -v -da -Q -g -O0 -DTEST=1 tlisp.c lisp.c && ./a.out ; rm tlisp.c
#echo "--- compile for ESP8266 ---"
#echo
#echo "----------------------------------------------------------------------"
#source add-path && make
#echo "----------------------------------------------------------------------"
#echo