Add QSBR minimal example
[urcu.git] / doc / examples / qsbr-minimal / Makefile
CommitLineData
8bad63a0
MD
1# Copyright (C) 2013 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
12CC = gcc
13LIBS = -lurcu-qsbr
14CFLAGS = -g -O2 -Wall
15
16# Only necessary when building from the source tree and userspace RCU is
17# not installed
18ifdef BUILD_EXAMPLES_FROM_TREE
19LOCAL_CPPFLAGS += -I../../../urcu/ -I../../../
20LIBURCU_QSBR_PATH = ../../../.libs/
21override LDFLAGS += -L$(LIBURCU_QSBR_PATH) -Wl,-rpath='$$ORIGIN/$(LIBURCU_QSBR_PATH)'
22
23# Third-party Makefiles have to define these targets to integrate with an
24# automake project
25EMPTY_AUTOMAKE_TARGETS = distdir install install-data install-exec uninstall \
26 install-dvi install-html install-info install-ps install-pdf \
27 installdirs check installcheck mostlyclean distclean maintainer-clean \
28 dvi pdf ps info tags ctags
29.PHONY: $(EMPTY_AUTOMAKE_TARGETS)
30$(EMPTY_AUTOMAKE_TARGETS):
31endif
32
33all: qsbr-minimal
34
35qsbr-minimal: qsbr-minimal.o
36 $(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
37
38qsbr-minimal.o: qsbr-minimal.c
39 $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) -c -o $@ $<
40
41.PHONY: clean
42clean:
43 rm -f *.o qsbr-minimal
This page took 0.023458 seconds and 4 git commands to generate.