Added time to debug build
This commit is contained in:
parent
d6a3f2af7b
commit
57207920c8
|
@ -1,5 +1,5 @@
|
|||
<> (?x dup) (?x ?x)
|
||||
<> (?x ?y swap) (?y ?x)
|
||||
<> ( ?x pop) ()
|
||||
<> (greeting) (Melcome to)
|
||||
<> (name) (Modal --)
|
||||
<> (?: ?: -- print) ()
|
||||
|
||||
(1 2 3) (4 5 6) swap pop dup
|
||||
greeting name print
|
|
@ -12,8 +12,6 @@
|
|||
<> (?x dup) (?x ?x)
|
||||
<> (?x ?y swap) (?y ?x)
|
||||
<> (?x pop) ()
|
||||
<> (print ?:) ()
|
||||
|
||||
(implode reverse (explode hello)) (read) (explode hello) empty-register (eq abc abc) (eq abc def) (1 2 3) (4 5 6) swap pop dup (hey 1234 pop)
|
||||
|
||||
|
||||
|
||||
(implode reverse (explode hello)) (read) (explode hello) empty-register (eq abc abc) (eq abc def) (1 2 3) (4 5 6) swap pop dup (hey 1234 pop) (print Done.)
|
16
makefile
16
makefile
|
@ -3,16 +3,16 @@ DEBUG_flags=-std=c89 -D_POSIX_C_SOURCE=199309L -DDEBUG -Wall -Wno-unknown-pragma
|
|||
|
||||
.PHONY: all debug dest run test install uninstall format clean archive
|
||||
|
||||
all: dest bin/modal
|
||||
all: dest
|
||||
|
||||
dest:
|
||||
@ mkdir -p bin
|
||||
run: all
|
||||
@ bin/modal examples/test.modal "(arg1) (arg2 (arg3))"
|
||||
test: all
|
||||
run: bin/modal
|
||||
@ bin/modal examples/hello.modal 2> /dev/null
|
||||
test: bin/modal-debug
|
||||
@ bin/modal -v
|
||||
@ bin/modal examples/test.modal 2> /dev/null
|
||||
install: all
|
||||
@ time bin/modal examples/test.modal "(arg1) (arg2 (arg3))"
|
||||
install: bin/modal
|
||||
cp bin/modal ~/bin/
|
||||
uninstall:
|
||||
rm -f ~/bin/modal
|
||||
|
@ -23,6 +23,8 @@ clean:
|
|||
archive: all
|
||||
cp src/modal.c ../oscean/etc/modal.c.txt
|
||||
|
||||
bin/modal-debug: src/modal.c
|
||||
@ cc ${DEBUG_flags} src/modal.c -o bin/modal-debug
|
||||
bin/modal: src/modal.c
|
||||
@ cc ${DEBUG_flags} ${CFLAGS} src/modal.c -o bin/modal
|
||||
@ cc ${RELEASE_flags} src/modal.c -o bin/modal-debug
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ main(int argc, char **argv)
|
|||
if(argc < 2)
|
||||
return !printf("usage: modal [-v] source.modal\n");
|
||||
if(argc < 3 && argv[1][0] == '-' && argv[1][1] == 'v')
|
||||
return !printf("Modal - Modal Interpreter, 8 Apr 2024.\n");
|
||||
return !printf("Modal Interpreter, 8 Apr 2024.\n");
|
||||
if(!(f = fopen(argv[1], "r")))
|
||||
return !printf("Invalid Modal file: %s.\n", argv[1]);
|
||||
while(fread(&c, 1, 1, f)) {
|
||||
|
|
Loading…
Reference in New Issue