it runs
[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. -g
9
10 all: test sample-instrument-fct libltt-instrument-functions.a libltt-instrument-functions.so.0
11
12 test: test.c ltt-usertrace-fast.c
13 $(CC) $(CFLAGS) -I. -lpthread -o $@ $^
14
15
16 sample-instrument-fct: sample-instrument-fct.c
17 $(CC) $(CFLAGS) -L. -g -finstrument-functions -lltt-instrument-functions -o $@ $^
18
19 libltt-instrument-functions.a: ltt-instrument-functions.o ltt-facility-loader-user_generic.o ltt-usertrace-fast.o
20 @rm -f libltt-instrument-functions.a
21 $(AR) rc $@ $^
22 $(RANLIB) $@
23
24 libltt-instrument-functions.so.0: ltt-instrument-functions.o ltt-facility-loader-user_generic.o ltt-usertrace-fast.o
25 @rm -f libltt-instrument-functions.so libltt-instrument-functions.so.0
26 $(CC) $(CFLAGS) -lpthread -shared -Wl,-soname,libltt-instrument-functions.so -o $@ $^
27 ln -s libltt-instrument-functions.so.0 libltt-instrument-functions.so
28
29 install:
30 if [ ! -e "$(INCLUDE_DIR)/ltt" ] ; then mkdir $(INCLUDE_DIR)/ltt ; fi
31 cp -f ltt/*.h $(INCLUDE_DIR)/ltt
32 cp -df libltt-instrument-functions.so* libltt-instrument-functions.a $(LIB_DIR)
33
34 .PHONY : clean install
35
36 clean:
37 rm -fr *.o *~ test sample-instrument-fct libltt-instrument-functions.a libltt-instrument-functions.so*
This page took 0.029912 seconds and 5 git commands to generate.