new ltt-usertrace
[lttv.git] / ltt-usertrace / Makefile
CommitLineData
3d57eb5b 1
3d57eb5b 2CC=gcc
15146922 3INCLUDE_DIR=/usr/include
20f73bc0 4LIB_DIR=/usr/lib
06b6cf12 5RANLIB=ranlib
3d57eb5b 6
06b6cf12 7all: libltt-instrument-functions.a libltt-instrument-functions.so.0 sample-thread sample sample-highspeed sample-printf sample-instrument-fct
3d57eb5b 8
9sample-thread: sample-thread.c ltt-facility-loader-user_generic.c
15146922 10 $(CC) $(CFLAGS) -lpthread -o $@ $^
3d57eb5b 11
12sample: sample.c ltt-facility-loader-user_generic.c
15146922 13 $(CC) $(CFLAGS) -o $@ $^
972a52cf 14
15sample-highspeed: sample-highspeed.c ltt-facility-loader-user_generic.c
15146922 16 $(CC) $(CFLAGS) -o $@ $^
3d57eb5b 17
e36efdc5 18sample-printf: sample-printf.c ltt-facility-loader-user_generic.c
15146922 19 $(CC) $(CFLAGS) -o $@ $^
20
06b6cf12 21sample-instrument-fct: sample-instrument-fct.c
22 $(CC) $(CFLAGS) -L. -g -finstrument-functions -lltt-instrument-functions -o $@ $^
20f73bc0 23
06b6cf12 24libltt-instrument-functions.a: ltt-instrument-functions.o ltt-facility-loader-user_generic.o
25 @rm -f libltt-instrument-functions.a
26 $(AR) rc $@ $^
27 $(RANLIB) $@
28
29libltt-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
e90c7b86 33
15146922 34.PHONY : clean install
e36efdc5 35
15146922 36install:
37 if [ ! -e "$(INCLUDE_DIR)/ltt" ] ; then mkdir $(INCLUDE_DIR)/ltt ; fi
38 cp -f ltt/*.h $(INCLUDE_DIR)/ltt
b09f3215 39 cp -df libltt-instrument-functions.so* libltt-instrument-functions.a $(LIB_DIR)
3d57eb5b 40
41clean:
06b6cf12 42 rm -fr *.o *~ sample-thread sample sample-highspeed sample-printf sample-instrument-fct libltt-instrument-functions.so* libltt-instrument-functions.a
3d57eb5b 43
This page took 0.025384 seconds and 4 git commands to generate.