Makefile changes from building for macos
This commit is contained in:
parent
9737c713ca
commit
070a11b461
10
Makefile
10
Makefile
@ -6,9 +6,9 @@ MODULES = $(patsubst src/module_%.c, modules/%.so, $(sort $(wildcard src/module
|
||||
HEADERS = $(wildcard src/*.h)
|
||||
|
||||
ifndef KRK_ENABLE_STATIC
|
||||
CFLAGS += -fPIC -L.
|
||||
CFLAGS += -fPIC
|
||||
ifeq (,$(findstring mingw,$(CC)))
|
||||
LDFLAGS += -Wl,-rpath -Wl,'$$ORIGIN' -Wl,-z,origin
|
||||
LDFLAGS += -Wl,-rpath -Wl,'$$ORIGIN' -L.
|
||||
LDLIBS += -ldl -lkuroko
|
||||
else
|
||||
CFLAGS += -Wno-format
|
||||
@ -56,13 +56,13 @@ kuroko: src/kuroko.o ${KUROKO_LIBS}
|
||||
%.o: ${HEADERS}
|
||||
|
||||
modules/%.so: src/module_%.c libkuroko.so
|
||||
${CC} ${CFLAGS} -shared -o $@ $< ${LDLIBS}
|
||||
${CC} ${CFLAGS} ${LDFLAGS} -shared -o $@ $< ${LDLIBS}
|
||||
|
||||
modules/math.so: src/module_math.c libkuroko.so
|
||||
${CC} ${CFLAGS} -shared -o $@ $< -lm ${LDLIBS}
|
||||
${CC} ${CFLAGS} ${LDFLAGS} -shared -o $@ $< -lm ${LDLIBS}
|
||||
|
||||
libkuroko.so: ${OBJS}
|
||||
${CC} ${CFLAGS} -shared -o $@ ${OBJS}
|
||||
${CC} ${CFLAGS} ${LDFLAGS} -shared -o $@ ${OBJS}
|
||||
|
||||
src/builtins.c: src/builtins.krk
|
||||
echo "const char krk_builtinsSrc[] = " > $@
|
||||
|
@ -1143,7 +1143,7 @@ static KrkToken decorator(size_t level, FunctionType type) {
|
||||
if (parser.previous.length != blockWidth) error("Expected next line after decorator to have same indentation.");
|
||||
}
|
||||
|
||||
KrkToken funcName;
|
||||
KrkToken funcName = {0};
|
||||
if (check(TOKEN_DEF)) {
|
||||
/* We already checked for block level */
|
||||
advance();
|
||||
|
Loading…
Reference in New Issue
Block a user