mirror of
https://github.com/janet-lang/janet
synced 2024-12-25 07:50:27 +00:00
Update to work on CENTOS.
This commit is contained in:
parent
bf36182a23
commit
a86540a876
7
Makefile
7
Makefile
@ -22,7 +22,7 @@
|
||||
##### Set global variables #####
|
||||
################################
|
||||
|
||||
PREFIX?=/usr
|
||||
PREFIX?=/usr/local
|
||||
|
||||
INCLUDEDIR=$(PREFIX)/include/janet
|
||||
LIBDIR=$(PREFIX)/lib
|
||||
@ -34,8 +34,7 @@ BINDIR=$(PREFIX)/bin
|
||||
|
||||
#CFLAGS=-std=c99 -Wall -Wextra -Isrc/include -fpic -g
|
||||
CFLAGS=-std=c99 -Wall -Wextra -Isrc/include -fpic -O2 -fvisibility=hidden
|
||||
CLIBS=-lm -ldl
|
||||
PREFIX=/usr/local
|
||||
CLIBS=-lm -ldl -lrt
|
||||
JANET_TARGET=janet
|
||||
JANET_LIBRARY=libjanet.so
|
||||
DEBUGGER=gdb
|
||||
@ -148,9 +147,11 @@ clean:
|
||||
-rm $(JANET_GENERATED_HEADERS)
|
||||
|
||||
install: $(JANET_TARGET)
|
||||
mkdir -p $(BINDIR)
|
||||
cp $(JANET_TARGET) $(BINDIR)/$(JANET_TARGET)
|
||||
mkdir -p $(INCLUDEDIR)
|
||||
cp $(JANET_HEADERS) $(INCLUDEDIR)
|
||||
mkdir -p $(LIBDIR)
|
||||
cp $(JANET_LIBRARY) $(LIBDIR)/$(JANET_LIBRARY)
|
||||
$(LDCONFIG)
|
||||
|
||||
|
@ -233,8 +233,8 @@
|
||||
true
|
||||
((fn aux [i]
|
||||
(cond
|
||||
(>= (inc i) len) (get forms i)
|
||||
(tuple 'if (get forms i) (aux (inc i)) false))) 0)))
|
||||
(>= (+ 1 i) len) (get forms i)
|
||||
(tuple 'if (get forms i) (aux (+ 1 i)) false))) 0)))
|
||||
|
||||
(defmacro or
|
||||
"Evaluates to the last argument if all preceding elements are false, otherwise
|
||||
@ -246,14 +246,14 @@
|
||||
((fn aux [i]
|
||||
(def fi (get forms i))
|
||||
(if
|
||||
(>= (inc i) len) fi
|
||||
(>= (+ 1 i) len) fi
|
||||
(do
|
||||
(if (atomic? fi)
|
||||
(tuple 'if fi fi (aux (inc i)))
|
||||
(tuple 'if fi fi (aux (+ 1 i)))
|
||||
(do
|
||||
(def $fi (gensym))
|
||||
(tuple 'do (tuple 'def $fi fi)
|
||||
(tuple 'if $fi $fi (aux (inc i))))))))) 0)))
|
||||
(tuple 'if $fi $fi (aux (+ 1 i))))))))) 0)))
|
||||
|
||||
(defmacro loop
|
||||
"A general purpose loop macro."
|
||||
|
Loading…
Reference in New Issue
Block a user