| 1 |
# Copyright (C) CNRS, INRIA, Université Bordeaux 1, Télécom SudParis |
| 2 |
# See COPYING in top-level directory. |
| 3 |
|
| 4 |
LIBRARIES=libinstrument.a libinstrument.so |
| 5 |
|
| 6 |
FXT_ROOT=$$EZTRACE_PREFIX |
| 7 |
TL_CFLAGS=-I$(FXT_ROOT)/include |
| 8 |
TL_LDFLAGS=-Wl,--rpath,$(FXT_ROOT)/lib -L$(FXT_ROOT)/lib $(TL_LIB) |
| 9 |
|
| 10 |
|
| 11 |
all: $(LIBRARIES) |
| 12 |
|
| 13 |
libinstrument.a: instrument.c |
| 14 |
gcc -c instrument.c -o instrument_static.o $(TL_CFLAGS) |
| 15 |
ar rcv libinstrument.a instrument_static.o |
| 16 |
|
| 17 |
libinstrument.so: instrument.c |
| 18 |
gcc -c instrument.c -o instrument_dynamic.o -fPIC $(TL_CFLAGS) |
| 19 |
gcc instrument_dynamic.o -shared -o libinstrument.so $(TL_LDFLAGS) |
| 20 |
|
| 21 |
run: |
| 22 |
|
| 23 |
clean: |
| 24 |
rm -f *.o $(LIBRARIES) |