Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/hcatlin/libsass
Browse files Browse the repository at this point in the history
Conflicts:
	Makefile
  • Loading branch information
Aaron Leung committed Oct 15, 2012
2 parents 7a238d1 + ae6c58e commit de3c1f7
Showing 1 changed file with 30 additions and 14 deletions.
44 changes: 30 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,37 @@
CC=g++
CFLAGS=-c -Wall -O2 -fPIC
LDFLAGS= -fPIC
SOURCES = \
constants.cpp context.cpp functions.cpp document.cpp \
document_parser.cpp eval_apply.cpp node.cpp \
node_factory.cpp node_emitters.cpp prelexer.cpp \
selector.cpp sass_interface.cpp
CC = g++
CFLAGS = -Wall -O2 -fPIC
LDFLAGS = -fPIC

PREFIX = /usr/local
LIBDIR = $(PREFIX)/lib

SOURCES = constants.cpp context.cpp functions.cpp document.cpp \
document_parser.cpp eval_apply.cpp node.cpp \
node_factory.cpp node_emitters.cpp prelexer.cpp \
selector.cpp sass_interface.cpp

OBJECTS = $(SOURCES:.cpp=.o)

all: $(OBJECTS)
ar rvs libsass.a $(OBJECTS)
static: libsass.a
shared: libsass.so

libsass.a: $(OBJECTS)
ar rvs $@ $(OBJECTS)

shared: $(OBJECTS)
$(CC) -shared -o libsass.so *.o
libsass.so: $(OBJECTS)
$(CC) -shared $(LDFLAGS) -o $@ $(OBJECTS)

.cpp.o:
$(CC) $(CFLAGS) $< -o $@
$(CC) $(CFLAGS) -c -o $@ $<

install: libsass.a
install -Dpm0755 $< $(DESTDIR)$(LIBDIR)/$<

install-shared: libsass.so
install -Dpm0755 $< $(DESTDIR)$(LIBDIR)/$<

clean:
rm -rf *.o *.a *.so
rm -f $(OBJECTS) *.a *.so


.PHONY: static shared install install-shared clean

0 comments on commit de3c1f7

Please sign in to comment.