it runs
[lttv.git] / usertrace-fast / Makefile
... / ...
CommitLineData
1
2LIB_DIR=/usr/lib
3INCLUDE_DIR=/usr/include
4
5RANLIB=ranlib
6
7CC=gcc
8CFLAGS=-I. -g
9
10all: test sample-instrument-fct libltt-instrument-functions.a libltt-instrument-functions.so.0
11
12test: test.c ltt-usertrace-fast.c
13 $(CC) $(CFLAGS) -I. -lpthread -o $@ $^
14
15
16sample-instrument-fct: sample-instrument-fct.c
17 $(CC) $(CFLAGS) -L. -g -finstrument-functions -lltt-instrument-functions -o $@ $^
18
19libltt-instrument-functions.a: ltt-instrument-functions.o ltt-facility-loader-user_generic.o ltt-usertrace-fast.o
20 @rm -f libltt-instrument-functions.a
21 $(AR) rc $@ $^
22 $(RANLIB) $@
23
24libltt-instrument-functions.so.0: ltt-instrument-functions.o ltt-facility-loader-user_generic.o ltt-usertrace-fast.o
25 @rm -f libltt-instrument-functions.so libltt-instrument-functions.so.0
26 $(CC) $(CFLAGS) -lpthread -shared -Wl,-soname,libltt-instrument-functions.so -o $@ $^
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
35
36clean:
37 rm -fr *.o *~ test sample-instrument-fct libltt-instrument-functions.a libltt-instrument-functions.so*
This page took 0.023752 seconds and 4 git commands to generate.