4c525e0e25
- Do not force use of clang++ to build the plugin (broken on recent debian and derivates: https://bugs.debian.org/643959) - Do not force clean on install - Use -fPIC to build objects (or g++ complains)
30 lines
473 B
Makefile
30 lines
473 B
Makefile
# To use clang, run: make CXX=clang++
|
|
|
|
CXXFLAGS = $(shell mapnik-config --cflags) -fPIC
|
|
|
|
LIBS = $(shell mapnik-config --libs --ldflags --dep-libs)
|
|
|
|
SRC = $(wildcard *.cpp)
|
|
|
|
OBJ = $(SRC:.cpp=.o)
|
|
|
|
BIN = hello.input
|
|
|
|
all : $(SRC) $(BIN)
|
|
|
|
$(BIN) : $(OBJ)
|
|
$(CXX) -shared $(OBJ) $(LIBS) -o $@
|
|
|
|
.cpp.o :
|
|
$(CXX) -c $(CXXFLAGS) $< -o $@
|
|
|
|
.PHONY : clean
|
|
|
|
clean:
|
|
rm -f $(OBJ)
|
|
rm -f $(BIN)
|
|
|
|
deploy : all
|
|
cp hello.input $(shell mapnik-config --input-plugins)
|
|
|
|
install: all deploy
|