make a dynamic lib
[lttv.git] / usertrace-generic / Makefile
1
2 CC=gcc
3 INCLUDE_DIR=/usr/include
4 LIB_DIR=/usr/lib
5
6 all: sample-thread sample sample-highspeed sample-printf sample-instrument-fct ltt-instrument-functions.so.0
7
8 sample-thread: sample-thread.c ltt-facility-loader-user_generic.c
9 $(CC) $(CFLAGS) -lpthread -o $@ $^
10
11 sample: sample.c ltt-facility-loader-user_generic.c
12 $(CC) $(CFLAGS) -o $@ $^
13
14 sample-highspeed: sample-highspeed.c ltt-facility-loader-user_generic.c
15 $(CC) $(CFLAGS) -o $@ $^
16
17 sample-printf: sample-printf.c ltt-facility-loader-user_generic.c
18 $(CC) $(CFLAGS) -o $@ $^
19
20 sample-instrument-fct: sample-instrument-fct.c ltt-facility-loader-user_generic.c ltt-instrument-functions.c
21 $(CC) $(CFLAGS) -g -finstrument-functions -o $@ $^
22
23 ltt-instrument-functions.so.0: ltt-facility-loader-user_generic.c ltt-instrument-functions.c
24 $(CC) $(CFLAGS) -shared -Wl,-soname,ltt-instrument-functions.so -o $@ $^
25 ln -s ltt-instrument-functions.so.0 ltt-instrument-functions.so
26
27 .PHONY : clean install
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 -f ltt-instrument-functions.so* $(LIB_DIR)
33
34 clean:
35 rm -fr *.o *~ sample-thread sample sample-highspeed sample-printf sample-instrument-fct ltt-instrument-functions.so.0 ltt-instrument-functions.so
36
This page took 0.029182 seconds and 4 git commands to generate.