Commit a8ca4ab9 by Aaron Leung

Adding an option for building a shared library because cgo can't link static libs.

parent 93dbb680
CC=g++
CFLAGS=-c -Wall -O2
LDFLAGS=
CFLAGS=-c -Wall -O2 -fPIC
LDFLAGS= -fPIC
SOURCES = \
context.cpp functions.cpp document.cpp \
document_parser.cpp eval_apply.cpp node.cpp \
......@@ -11,8 +11,11 @@ OBJECTS = $(SOURCES:.cpp=.o)
all: $(OBJECTS)
ar rvs libsass.a $(OBJECTS)
shared: $(OBJECTS)
gcc -shared -o libsass.so *.o
.cpp.o:
$(CC) $(CFLAGS) $< -o $@
clean:
rm -rf *.o *.a
\ No newline at end of file
rm -rf *.o *.a *.so
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment