klisp

an open source interpreter for the Kernel Programming Language.
git clone http://git.hanabi.in/repos/klisp.git
Log | Files | Refs | README

commit feedf91b757cb4e3cd31b689a63a2094c23685f9
parent 0846c340a570146f4281d74ad8b0d3238ea501d2
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Tue, 21 Feb 2012 14:40:05 -0300

Updated makefile to only use -arch option on macosx, added a couple of static modifiers to avoid warnings

Diffstat:
Msrc/Makefile | 13+++++++++----
Msrc/keval.c | 2+-
Msrc/kgenv_mut.c | 2+-
Msrc/kghelpers.h | 2+-
4 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/Makefile b/src/Makefile @@ -9,11 +9,11 @@ PLAT= none CC=gcc # TEMP for now put in debug symbols # TEMP for now only 32 bit binaries (see kobject.h) -CFLAGS=-arch i386 -O2 -g -std=c99 -Wall -m32 $(MYCFLAGS) +CFLAGS=-O2 -g -std=c99 -Wall -m32 $(MYCFLAGS) AR= ar rcu RANLIB= ranlib RM= rm -f -LIBS= -arch i386 -lm $(MYLIBS) +LIBS=-lm $(MYLIBS) # Set USE_LIBFFI=1 (or other nonempty string) to enable libffi-dependent # code. @@ -27,8 +27,8 @@ MYLIBS= # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE ========= -# TEMP only these two for now -PLATS= generic mingw posix +# TEMP only these for now +PLATS= generic mingw posix macosx KRN_A= libklisp.a CORE_O= kobject.o ktoken.o kpair.o kstring.o ksymbol.o kread.o \ @@ -110,6 +110,11 @@ posix: $(MAKE) all \ "MYCFLAGS=-DKLISP_USE_POSIX -D_POSIX_SOURCE $(if $(USE_LIBFFI),-DKUSE_LIBFFI=1)" \ "MYLIBS=$(if $(USE_LIBFFI), -rdynamic -ldl -lffi)" +macosx: + $(MAKE) all \ + "MYCFLAGS=-DKLISP_USE_POSIX -D_POSIX_SOURCE $(if $(USE_LIBFFI),-DKUSE_LIBFFI=1) " \ + "-arch i386" \ + "MYLIBS=$(if $(USE_LIBFFI), -rdynamic -ldl -lffi) -arch i386" # for use in emacs tags: diff --git a/src/keval.c b/src/keval.c @@ -58,7 +58,7 @@ void do_eval_ls(klisp_State *K) } /* TODO: move this to another file, to use it elsewhere */ -inline void clear_ls_marks(TValue ls) +static inline void clear_ls_marks(TValue ls) { while (ttispair(ls) && kis_marked(ls)) { kunmark(ls); diff --git a/src/kgenv_mut.c b/src/kgenv_mut.c @@ -129,7 +129,7 @@ void do_set_eval_obj(klisp_State *K) /* Helpers for $provide! & $import! */ -inline void unmark_maybe_symbol_list(klisp_State *K, TValue ls) +static inline void unmark_maybe_symbol_list(klisp_State *K, TValue ls) { UNUSED(K); while(ttispair(ls) && kis_marked(ls)) { diff --git a/src/kghelpers.h b/src/kghelpers.h @@ -307,7 +307,7 @@ inline bool knum_same_signp(klisp_State *K, TValue n1, TValue n2) ** MAYBE: These shouldn't be inline really. ** These two stop at the first object that is not a marked pair */ -inline void unmark_list(klisp_State *K, TValue obj) +static inline void unmark_list(klisp_State *K, TValue obj) { UNUSED(K); /* not needed, it's here for consistency */ while(ttispair(obj) && kis_marked(obj)) {