update for threads
[lttv.git] / usertrace-fast / Makefile
1
2 LIB_DIR=/usr/lib
3 INCLUDE_DIR=/usr/include
4
5 RANLIB=ranlib
6
7 CC=gcc
8 CFLAGS=-I. -O3
9 CFLAGS+=-DLTT_SUBBUF_SIZE_CPU=134217728
10
11 all: test sample-instrument-fct libltt-instrument-functions.a libltt-instrument-functions.so.0
12
13 test: test.c ltt-usertrace-fast.c
14 $(CC) $(CFLAGS) -I. -lpthread -o $@ $^
15
16
17 sample-instrument-fct: sample-instrument-fct.c
18 $(CC) $(CFLAGS) -L. -g -finstrument-functions -lltt-instrument-functions -o $@ $^
19
20 libltt-instrument-functions.a: ltt-instrument-functions.o ltt-facility-loader-user_generic.o ltt-usertrace-fast.o
21 @rm -f libltt-instrument-functions.a
22 $(AR) rc $@ $^
23 $(RANLIB) $@
24
25 libltt-instrument-functions.so.0: ltt-instrument-functions.o ltt-facility-loader-user_generic.o ltt-usertrace-fast.o
26 @rm -f libltt-instrument-functions.so libltt-instrument-functions.so.0
27 $(CC) $(CFLAGS) -lpthread -shared -Wl,-soname,libltt-instrument-functions.so -o $@ $^
28 ln -s libltt-instrument-functions.so.0 libltt-instrument-functions.so
29
30 install:
31 if [ ! -e "$(INCLUDE_DIR)/ltt" ] ; then mkdir $(INCLUDE_DIR)/ltt ; fi
32 cp -f ltt/*.h $(INCLUDE_DIR)/ltt
33 cp -df libltt-instrument-functions.so* libltt-instrument-functions.a $(LIB_DIR)
34
35 .PHONY : clean install
36
37 clean:
38 rm -fr *.o *~ test sample-instrument-fct libltt-instrument-functions.a libltt-instrument-functions.so*
This page took 0.030074 seconds and 5 git commands to generate.