This repository was archived by the owner on Oct 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +30
-14
lines changed Expand file tree Collapse file tree 1 file changed +30
-14
lines changed Original file line number Diff line number Diff line change 1- CC =g++
2- CFLAGS =-c -Wall -O2 -fPIC
3- LDFLAGS = -fPIC
4- SOURCES = \
5- constants.cpp context.cpp functions.cpp document.cpp \
6- document_parser.cpp eval_apply.cpp node.cpp \
7- node_factory.cpp node_emitters.cpp prelexer.cpp \
8- selector.cpp sass_interface.cpp
1+ CC = g++
2+ CFLAGS = -Wall -O2 -fPIC
3+ LDFLAGS = -fPIC
4+
5+ PREFIX = /usr/local
6+ LIBDIR = $(PREFIX ) /lib
7+
8+ SOURCES = constants.cpp context.cpp functions.cpp document.cpp \
9+ document_parser.cpp eval_apply.cpp node.cpp \
10+ node_factory.cpp node_emitters.cpp prelexer.cpp \
11+ selector.cpp sass_interface.cpp
12+
913OBJECTS = $(SOURCES:.cpp=.o )
1014
11- all : $(OBJECTS )
12- ar rvs libsass.a $(OBJECTS )
15+ static : libsass.a
16+ shared : libsass.so
17+
18+ libsass.a : $(OBJECTS )
19+ ar rvs $@ $(OBJECTS )
1320
14- shared : $(OBJECTS )
15- $(CC ) -shared -o libsass.so * .o
21+ libsass.so : $(OBJECTS )
22+ $(CC ) -shared $( LDFLAGS ) -o $@ $( OBJECTS )
1623
1724.cpp.o :
18- $(CC ) $(CFLAGS ) $< -o $@
25+ $(CC ) $(CFLAGS ) -c -o $@ $<
26+
27+ install : libsass.a
28+ install -Dpm0755 $< $(DESTDIR )$(LIBDIR ) /$<
29+
30+ install-shared : libsass.so
31+ install -Dpm0755 $< $(DESTDIR )$(LIBDIR ) /$<
1932
2033clean :
21- rm -rf * .o * .a * .so
34+ rm -f $(OBJECTS ) * .a * .so
35+
36+
37+ .PHONY : static shared install install-shared clean
You can’t perform that action at this time.
0 commit comments