Implement availability API checks
[librseq.git] / Makefile
CommitLineData
784b0012
MD
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
6905dcac
MD
12
13CPPFLAGS += -I./include
14CFLAGS += -O2 -g
15LDFLAGS += -pthread
784b0012 16
3d83ff37
MD
17PREFIX = /usr/local
18
784b0012
MD
19all: librseq.so
20
b32429a9 21INCLUDES=$(wildcard include/rseq/*.h)
784b0012 22
52e82b87 23librseq.so: src/rseq.c src/cpu-op.c src/percpu-op.c ${INCLUDES}
b32429a9 24 $(CC) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -shared -fpic \
52e82b87 25 src/rseq.c src/cpu-op.c src/percpu-op.c -o $@
784b0012 26
3d83ff37 27.PHONY: clean install uninstall
784b0012
MD
28
29clean:
30 rm -f librseq.so
3d83ff37
MD
31
32install: librseq.so
33 mkdir -p $(DESTDIR)$(PREFIX)/lib
14a8a7c8
MD
34 cp librseq.so $(DESTDIR)$(PREFIX)/lib/librseq.so
35 mkdir -p $(DESTDIR)$(PREFIX)/include/rseq
36 cp include/rseq/*.h $(DESTDIR)$(PREFIX)/include/rseq
3d83ff37
MD
37
38uninstall:
39 rm -f $(DESTDIR)$(PREFIX)/lib/librseq.so
14a8a7c8
MD
40 rm -f $(DESTDIR)$(PREFIX)/include/rseq/*.h
41 rmdir $(DESTDIR)$(PREFIX)/include/rseq/
This page took 0.031386 seconds and 4 git commands to generate.