usertrace : make state.c ok for reused pids
[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
8a9103df 8CFLAGS=-I. -O3
9CFLAGS+=-DLTT_SUBBUF_SIZE_CPU=134217728
b09f3215 10
8b30e7bc 11all: test sample-instrument-fct libltt-instrument-functions.a libltt-instrument-functions.so.0
12
1c48e587 13test: test.c ltt-usertrace-fast.c
b5d612cb 14 $(CC) $(CFLAGS) -I. -lpthread -o $@ $^
b09f3215 15
8b30e7bc 16
17sample-instrument-fct: sample-instrument-fct.c
18 $(CC) $(CFLAGS) -L. -g -finstrument-functions -lltt-instrument-functions -o $@ $^
19
b5d612cb 20libltt-instrument-functions.a: ltt-instrument-functions.o ltt-facility-loader-user_generic.o ltt-usertrace-fast.o
8b30e7bc 21 @rm -f libltt-instrument-functions.a
22 $(AR) rc $@ $^
23 $(RANLIB) $@
24
b5d612cb 25libltt-instrument-functions.so.0: ltt-instrument-functions.o ltt-facility-loader-user_generic.o ltt-usertrace-fast.o
8b30e7bc 26 @rm -f libltt-instrument-functions.so libltt-instrument-functions.so.0
b5d612cb 27 $(CC) $(CFLAGS) -lpthread -shared -Wl,-soname,libltt-instrument-functions.so -o $@ $^
8b30e7bc 28 ln -s libltt-instrument-functions.so.0 libltt-instrument-functions.so
29
30install:
31 if [ ! -e "$(INCLUDE_DIR)/ltt" ] ; then mkdir $(INCLUDE_DIR)/ltt ; fi
32 cp -f ltt/*.h $(INCLUDE_DIR)/ltt
33 cp -df libltt-instrument-functions.so* libltt-instrument-functions.a $(LIB_DIR)
34
35.PHONY : clean install
b09f3215 36
37clean:
8b30e7bc 38 rm -fr *.o *~ test sample-instrument-fct libltt-instrument-functions.a libltt-instrument-functions.so*
This page took 0.024524 seconds and 4 git commands to generate.