3 INCLUDE_DIR
=/usr
/include
7 LTT_CFLAGS
=-I.
-O2
-L.
-fPIC
8 # note : x86_64 needs -fPIC ? FIXME
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 sample-thread-brand sample-block
22 $(CC
) $(LTT_CFLAGS
) $(CFLAGS
) -lltt-loader-user_generic
-o
$@
$^
23 sample-block
: sample-block.c
24 $(CC
) $(LTT_CFLAGS
) $(CFLAGS
) -lltt-loader-user_generic
-o
$@
$^
26 sample-thread-brand
: sample-thread-brand.c
27 $(CC
) $(LTT_CFLAGS
) $(CFLAGS
) -lltt-loader-user_generic
-o
$@
$^
29 sample-highspeed
: sample-highspeed.c
30 $(CC
) $(LTT_CFLAGS
) $(CFLAGS
) -lltt-usertrace-fast
-lltt-loader-user_generic
-o
$@
$^
32 sample-printf
: sample-printf.c
33 $(CC
) $(LTT_CFLAGS
) $(CFLAGS
) -lltt-loader-user_generic
-o
$@
$^
35 sample-instrument-fct
: sample-instrument-fct.c
36 $(CC
) $(LTT_CFLAGS
) $(CFLAGS
) -g
-finstrument-functions
-lltt-instrument-functions
-o
$@
$^
38 sample-thread-slow
: sample-thread-slow.c
39 $(CC
) $(LTT_CFLAGS
) $(CFLAGS
) -lpthread
-lltt-loader-user_generic
-o
$@
$^
41 sample-thread-fast
: sample-thread-fast.c
42 $(CC
) $(LTT_CFLAGS
) $(CFLAGS
) -lpthread
-lltt-usertrace-fast
-lltt-loader-user_generic
-o
$@
$^
47 libs
: libltt-instrument-functions.a libltt-instrument-functions.so
.0 \
48 libltt-usertrace-fast.a libltt-usertrace-fast.so
.0 \
49 libltt-loader-user_generic.a libltt-loader-user_generic.so
.0
51 libltt-usertrace-fast.a
: ltt-usertrace-fast.o
52 @
rm -f libltt-usertrace-fast.a
56 libltt-usertrace-fast.so
.0: ltt-usertrace-fast.o
57 @
rm -f libltt-usertrace-fast.so libltt-usertrace-fast.so
.0
58 $(CC
) $(LTT_CFLAGS
) $(CFLAGS
) -lpthread
-shared
-Wl
,-soname
,libltt-usertrace-fast.so
-o
$@
$^
59 ln
-s libltt-usertrace-fast.so
.0 libltt-usertrace-fast.so
61 libltt-instrument-functions.a
: ltt-instrument-functions.o ltt-facility-loader-user_generic.o ltt-usertrace-fast.o
62 @
rm -f libltt-instrument-functions.a
66 libltt-instrument-functions.so
.0: ltt-instrument-functions.o ltt-facility-loader-user_generic.o ltt-usertrace-fast.o
67 @
rm -f libltt-instrument-functions.so libltt-instrument-functions.so
.0
68 $(CC
) $(LTT_CFLAGS
) $(CFLAGS
) -lpthread
-shared
-Wl
,-soname
,libltt-instrument-functions.so
-o
$@
$^
69 ln
-s libltt-instrument-functions.so
.0 libltt-instrument-functions.so
71 libltt-loader-user_generic.a
: ltt-facility-loader-user_generic.o
72 @
rm -f libltt-loader-user_generic.a
76 libltt-loader-user_generic.so
.0: ltt-facility-loader-user_generic.o
77 @
rm -f libltt-loader-user_generic.so libltt-loader-user_generic.so
.0
78 $(CC
) $(LTT_CFLAGS
) $(CFLAGS
) -lpthread
-shared
-Wl
,-soname
,libltt-loader-user_generic.so
-o
$@
$^
79 ln
-s libltt-loader-user_generic.so
.0 libltt-loader-user_generic.so
82 $(CC
) $(LTT_CFLAGS
) $(CFLAGS
) -c
-o
$@
$+
84 .PHONY
: clean install libs install_libs install_headers samples
87 if
[ ! -e
"$(INCLUDE_DIR)/ltt" ] ; then mkdir
$(INCLUDE_DIR
)/ltt
; fi
88 cp
-f ltt
/*.h
$(INCLUDE_DIR
)/ltt
91 cp
-df libltt-instrument-functions.so
* libltt-instrument-functions.a
$(LIB_DIR
)
92 cp
-df libltt-usertrace-fast.so
* libltt-usertrace-fast.a
$(LIB_DIR
)
93 cp
-df libltt-loader-user_generic.so
* libltt-loader-user_generic.a
$(LIB_DIR
)
95 install: install_headers libs install_libs
98 find .
-name \
*~ | xargs
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
* libltt-loader-user_generic.so
* libltt-loader-user_generic.a sample-thread-slow sample-thread-fast sample-thread-brand sample-block java
/*.class java
/Sample.h java
/TestBrand.h