3d57eb5b |
1 | |
3d57eb5b |
2 | CC=gcc |
15146922 |
3 | INCLUDE_DIR=/usr/include |
20f73bc0 |
4 | LIB_DIR=/usr/lib |
3d57eb5b |
5 | |
20f73bc0 |
6 | all: sample-thread sample sample-highspeed sample-printf sample-instrument-fct ltt-instrument-functions.so.0 |
3d57eb5b |
7 | |
8 | sample-thread: sample-thread.c ltt-facility-loader-user_generic.c |
15146922 |
9 | $(CC) $(CFLAGS) -lpthread -o $@ $^ |
3d57eb5b |
10 | |
11 | sample: sample.c ltt-facility-loader-user_generic.c |
15146922 |
12 | $(CC) $(CFLAGS) -o $@ $^ |
972a52cf |
13 | |
14 | sample-highspeed: sample-highspeed.c ltt-facility-loader-user_generic.c |
15146922 |
15 | $(CC) $(CFLAGS) -o $@ $^ |
3d57eb5b |
16 | |
e36efdc5 |
17 | sample-printf: sample-printf.c ltt-facility-loader-user_generic.c |
15146922 |
18 | $(CC) $(CFLAGS) -o $@ $^ |
19 | |
e90c7b86 |
20 | sample-instrument-fct: sample-instrument-fct.c ltt-facility-loader-user_generic.c ltt-instrument-functions.c |
21 | $(CC) $(CFLAGS) -g -finstrument-functions -o $@ $^ |
20f73bc0 |
22 | |
23 | ltt-instrument-functions.so.0: ltt-facility-loader-user_generic.c ltt-instrument-functions.c |
24 | $(CC) $(CFLAGS) -shared -Wl,-soname,ltt-instrument-functions.so -o $@ $^ |
25 | ln -s ltt-instrument-functions.so.0 ltt-instrument-functions.so |
e90c7b86 |
26 | |
15146922 |
27 | .PHONY : clean install |
e36efdc5 |
28 | |
15146922 |
29 | install: |
30 | if [ ! -e "$(INCLUDE_DIR)/ltt" ] ; then mkdir $(INCLUDE_DIR)/ltt ; fi |
31 | cp -f ltt/*.h $(INCLUDE_DIR)/ltt |
20f73bc0 |
32 | cp -f ltt-instrument-functions.so* $(LIB_DIR) |
3d57eb5b |
33 | |
34 | clean: |
20f73bc0 |
35 | rm -fr *.o *~ sample-thread sample sample-highspeed sample-printf sample-instrument-fct ltt-instrument-functions.so.0 ltt-instrument-functions.so |
3d57eb5b |
36 | |