3 INCLUDE_DIR
=/usr
/include
10 #For testing lib ltt-usertrace-fast
11 #CFLAGS+=-DLTT_SUBBUF_SIZE_CPU=134217728
12 #CFLAGS+=-DLTT_NULL_OUTPUT_TEST
18 samples
: sample sample-highspeed sample-printf \
19 sample-instrument-fct sample-thread-slow sample-thread-fast
21 sample
: sample.c ltt-facility-loader-user_generic.c
22 $(CC
) $(CFLAGS
) -o
$@
$^
24 sample-highspeed
: sample-highspeed.c ltt-facility-loader-user_generic.c
25 $(CC
) $(CFLAGS
) -L.
-lltt-usertrace-fast
-o
$@
$^
27 sample-printf
: sample-printf.c ltt-facility-loader-user_generic.c
28 $(CC
) $(CFLAGS
) -o
$@
$^
30 sample-instrument-fct
: sample-instrument-fct.c
31 $(CC
) $(CFLAGS
) -L.
-g
-finstrument-functions
-lltt-instrument-functions
-o
$@
$^
33 sample-thread-slow
: sample-thread-slow.c ltt-facility-loader-user_generic.c
34 $(CC
) $(CFLAGS
) -lpthread
-o
$@
$^
36 sample-thread-fast
: sample-thread-fast.c ltt-facility-loader-user_generic.c
37 $(CC
) $(CFLAGS
) -lpthread
-o
$@
$^
42 libs
: libltt-instrument-functions.a libltt-instrument-functions.so
.0 \
43 libltt-usertrace-fast.a libltt-usertrace-fast.so
.0
45 libltt-usertrace-fast.a
: ltt-usertrace-fast.o
46 @
rm -f libltt-usertrace-fast.a
50 libltt-usertrace-fast.so
.0: ltt-usertrace-fast.o
51 @
rm -f libltt-usertrace-fast.so libltt-usertrace-fast.so
.0
52 $(CC
) $(CFLAGS
) -lpthread
-shared
-Wl
,-soname
,libltt-usertrace-fast.so
-o
$@
$^
53 ln
-s libltt-usertrace-fast.so
.0 libltt-usertrace-fast.so
55 libltt-instrument-functions.a
: ltt-instrument-functions.o ltt-facility-loader-user_generic.o ltt-usertrace-fast.o
56 @
rm -f libltt-instrument-functions.a
60 libltt-instrument-functions.so
.0: ltt-instrument-functions.o ltt-facility-loader-user_generic.o ltt-usertrace-fast.o
61 @
rm -f libltt-instrument-functions.so libltt-instrument-functions.so
.0
62 $(CC
) $(CFLAGS
) -lpthread
-shared
-Wl
,-soname
,libltt-instrument-functions.so
-o
$@
$^
63 ln
-s libltt-instrument-functions.so
.0 libltt-instrument-functions.so
65 .PHONY
: clean install libs samples
68 if
[ ! -e
"$(INCLUDE_DIR)/ltt" ] ; then mkdir
$(INCLUDE_DIR
)/ltt
; fi
69 cp
-f ltt
/*.h
$(INCLUDE_DIR
)/ltt
70 cp
-df libltt-instrument-functions.so
* libltt-instrument-functions.a
$(LIB_DIR
)
71 cp
-df libltt-usertrace-fast.so
* libltt-usertrace-fast.a
$(LIB_DIR
)
74 rm -fr
*.o
*~ sample-thread sample sample-highspeed sample-printf sample-instrument-fct libltt-instrument-functions.so
* libltt-instrument-functions.a libltt-usertrace-fast.a libltt-usertrace-fast.so
.0