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