Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Commit de3c1f7

Browse files
author
Aaron Leung
committed
Merge branch 'master' of https://github.com/hcatlin/libsass
Conflicts: Makefile
2 parents 7a238d1 + ae6c58e commit de3c1f7

File tree

1 file changed

+30
-14
lines changed

1 file changed

+30
-14
lines changed

Makefile

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,37 @@
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+
913
OBJECTS = $(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

2033
clean:
21-
rm -rf *.o *.a *.so
34+
rm -f $(OBJECTS) *.a *.so
35+
36+
37+
.PHONY: static shared install install-shared clean

0 commit comments

Comments
 (0)