3 INCLUDE_DIR
=/usr
/include
7 all: libltt-instrument-functions.a libltt-instrument-functions.so
.0 sample-thread sample sample-highspeed sample-printf sample-instrument-fct
9 sample-thread
: sample-thread.c ltt-facility-loader-user_generic.c
10 $(CC
) $(CFLAGS
) -lpthread
-o
$@
$^
12 sample
: sample.c ltt-facility-loader-user_generic.c
13 $(CC
) $(CFLAGS
) -o
$@
$^
15 sample-highspeed
: sample-highspeed.c ltt-facility-loader-user_generic.c
16 $(CC
) $(CFLAGS
) -o
$@
$^
18 sample-printf
: sample-printf.c ltt-facility-loader-user_generic.c
19 $(CC
) $(CFLAGS
) -o
$@
$^
21 sample-instrument-fct
: sample-instrument-fct.c
22 $(CC
) $(CFLAGS
) -L.
-g
-finstrument-functions
-lltt-instrument-functions
-o
$@
$^
24 libltt-instrument-functions.a
: ltt-instrument-functions.o ltt-facility-loader-user_generic.o
25 @
rm -f libltt-instrument-functions.a
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
34 .PHONY
: clean 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
)
42 rm -fr
*.o
*~ sample-thread sample sample-highspeed sample-printf sample-instrument-fct libltt-instrument-functions.so
* libltt-instrument-functions.a