it runs
[lttv.git] / usertrace-fast / Makefile
CommitLineData
b09f3215 1
b5d612cb 2LIB_DIR=/usr/lib
3INCLUDE_DIR=/usr/include
4
8b30e7bc 5RANLIB=ranlib
b09f3215 6
7CC=gcc
b5d612cb 8CFLAGS=-I. -g
b09f3215 9
8b30e7bc 10all: test sample-instrument-fct libltt-instrument-functions.a libltt-instrument-functions.so.0
11
1c48e587 12test: test.c ltt-usertrace-fast.c
b5d612cb 13 $(CC) $(CFLAGS) -I. -lpthread -o $@ $^
b09f3215 14
8b30e7bc 15
16sample-instrument-fct: sample-instrument-fct.c
17 $(CC) $(CFLAGS) -L. -g -finstrument-functions -lltt-instrument-functions -o $@ $^
18
b5d612cb 19libltt-instrument-functions.a: ltt-instrument-functions.o ltt-facility-loader-user_generic.o ltt-usertrace-fast.o
8b30e7bc 20 @rm -f libltt-instrument-functions.a
21 $(AR) rc $@ $^
22 $(RANLIB) $@
23
b5d612cb 24libltt-instrument-functions.so.0: ltt-instrument-functions.o ltt-facility-loader-user_generic.o ltt-usertrace-fast.o
8b30e7bc 25 @rm -f libltt-instrument-functions.so libltt-instrument-functions.so.0
b5d612cb 26 $(CC) $(CFLAGS) -lpthread -shared -Wl,-soname,libltt-instrument-functions.so -o $@ $^
8b30e7bc 27 ln -s libltt-instrument-functions.so.0 libltt-instrument-functions.so
28
29install:
30 if [ ! -e "$(INCLUDE_DIR)/ltt" ] ; then mkdir $(INCLUDE_DIR)/ltt ; fi
31 cp -f ltt/*.h $(INCLUDE_DIR)/ltt
32 cp -df libltt-instrument-functions.so* libltt-instrument-functions.a $(LIB_DIR)
33
34.PHONY : clean install
b09f3215 35
36clean:
8b30e7bc 37 rm -fr *.o *~ test sample-instrument-fct libltt-instrument-functions.a libltt-instrument-functions.so*
This page took 0.023856 seconds and 4 git commands to generate.