File: Makefile

package info (click to toggle)
pystring 1.1.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 200 kB
  • sloc: cpp: 1,896; makefile: 24
file content (24 lines) | stat: -rw-r--r-- 612 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
LIBTOOL ?= libtool
LIBDIR ?= /usr/lib
CXX ?= g++
CXXFLAGS ?= -g -O3 -Wall -Wextra -Wshadow -Wconversion -Wcast-qual -Wformat=2

all: libpystring.la

pystring.lo: pystring.h pystring.cpp
	$(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(CXXFLAGS) -c pystring.cpp

libpystring.la: pystring.lo
	$(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $< -rpath $(LIBDIR)

install: libpystring.la
	$(LIBTOOL) --mode=install install -c $< $(LIBDIR)/$<

clean:
	$(RM) -fr pystring.lo pystring.o libpystring.la .libs

.PHONY: test
test:
	$(RM) -fr test
	$(CXX) pystring.cpp test.cpp $(CXXFLAGS) -DPYSTRING_UNITTEST=1 -o test
	./test