Makefile: install/uninstall targets
[librseq.git] / Makefile
1 # Copyright (C) 2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
2 #
3 # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
4 # OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
5 #
6 # Permission is hereby granted to use or copy this program for any
7 # purpose, provided the above notices are retained on all copies.
8 # Permission to modify the code and to distribute modified code is
9 # granted, provided the above notices are retained, and a notice that
10 # the code was modified is included with the above copyright notice.
11
12
13 CPPFLAGS += -I./include
14 CFLAGS += -O2 -g
15 LDFLAGS += -pthread
16
17 PREFIX = /usr/local
18
19 all: librseq.so
20
21 INCLUDES=$(wildcard remote/*.h)
22
23 librseq.so: src/rseq.c ${INCLUDES}
24 $(CC) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -shared -fpic src/rseq.c -o $@
25
26 .PHONY: clean install uninstall
27
28 clean:
29 rm -f librseq.so
30
31 install: librseq.so
32 mkdir -p $(DESTDIR)$(PREFIX)/lib
33 cp $< $(DESTDIR)$(PREFIX)/lib/librseq.so
34
35 uninstall:
36 rm -f $(DESTDIR)$(PREFIX)/lib/librseq.so
This page took 0.050904 seconds and 5 git commands to generate.