3 INCLUDE_DIR
=/usr
/include
9 #For testing lib ltt-usertrace-fast
10 #CFLAGS+=-DLTT_SUBBUF_SIZE_CPU=134217728
11 #CFLAGS+=-DLTT_NULL_OUTPUT_TEST
17 samples
: sample sample-highspeed sample-printf \
18 sample-instrument-fct sample-thread-slow sample-thread-fast sample-thread-brand
20 sample
: sample.c ltt-facility-loader-user_generic.c
21 $(CC
) $(LTT_CFLAGS
) $(CFLAGS
) -o
$@
$^
23 sample-thread-brand
: sample-thread-brand.c ltt-facility-loader-user_generic.c
24 $(CC
) $(LTT_CFLAGS
) $(CFLAGS
) -o
$@
$^
26 sample-highspeed
: sample-highspeed.c ltt-facility-loader-user_generic.c
27 $(CC
) $(LTT_CFLAGS
) $(CFLAGS
) -lltt-usertrace-fast
-o
$@
$^
29 sample-printf
: sample-printf.c ltt-facility-loader-user_generic.c
30 $(CC
) $(LTT_CFLAGS
) $(CFLAGS
) -o
$@
$^
32 sample-instrument-fct
: sample-instrument-fct.c
33 $(CC
) $(LTT_CFLAGS
) $(CFLAGS
) -g
-finstrument-functions
-lltt-instrument-functions
-o
$@
$^
35 sample-thread-slow
: sample-thread-slow.c ltt-facility-loader-user_generic.c
36 $(CC
) $(LTT_CFLAGS
) $(CFLAGS
) -lpthread
-o
$@
$^
38 sample-thread-fast
: sample-thread-fast.c ltt-facility-loader-user_generic.c
39 $(CC
) $(LTT_CFLAGS
) $(CFLAGS
) -lpthread
-lltt-usertrace-fast
-o
$@
$^
44 libs
: libltt-instrument-functions.a libltt-instrument-functions.so
.0 \
45 libltt-usertrace-fast.a libltt-usertrace-fast.so
.0
47 libltt-usertrace-fast.a
: ltt-usertrace-fast.o
48 @
rm -f libltt-usertrace-fast.a
52 libltt-usertrace-fast.so
.0: ltt-usertrace-fast.o
53 @
rm -f libltt-usertrace-fast.so libltt-usertrace-fast.so
.0
54 $(CC
) $(LTT_CFLAGS
) $(CFLAGS
) -lpthread
-shared
-Wl
,-soname
,libltt-usertrace-fast.so
-o
$@
$^
55 ln
-s libltt-usertrace-fast.so
.0 libltt-usertrace-fast.so
57 libltt-instrument-functions.a
: ltt-instrument-functions.o ltt-facility-loader-user_generic.o ltt-usertrace-fast.o
58 @
rm -f libltt-instrument-functions.a
62 libltt-instrument-functions.so
.0: ltt-instrument-functions.o ltt-facility-loader-user_generic.o ltt-usertrace-fast.o
63 @
rm -f libltt-instrument-functions.so libltt-instrument-functions.so
.0
64 $(CC
) $(LTT_CFLAGS
) $(CFLAGS
) -lpthread
-shared
-Wl
,-soname
,libltt-instrument-functions.so
-o
$@
$^
65 ln
-s libltt-instrument-functions.so
.0 libltt-instrument-functions.so
68 $(CC
) $(LTT_CFLAGS
) $(CFLAGS
) -c
-o
$@
$+
70 .PHONY
: clean install libs install_libs install_headers samples
73 if
[ ! -e
"$(INCLUDE_DIR)/ltt" ] ; then mkdir
$(INCLUDE_DIR
)/ltt
; fi
74 cp
-f ltt
/*.h
$(INCLUDE_DIR
)/ltt
77 cp
-df libltt-instrument-functions.so
* libltt-instrument-functions.a
$(LIB_DIR
)
78 cp
-df libltt-usertrace-fast.so
* libltt-usertrace-fast.a
$(LIB_DIR
)
80 install: install_headers libs install_libs
83 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
* sample-thread-slow sample-thread-fast