# Copyright (C) CNRS, INRIA, Université Bordeaux 1, Télécom SudParis
# See COPYING in top-level directory.

LIBRARIES=libinstrument.a libinstrument.so

FXT_ROOT=$$EZTRACE_PREFIX
TL_CFLAGS=-I$(FXT_ROOT)/include
TL_LDFLAGS=-Wl,--rpath,$(FXT_ROOT)/lib -L$(FXT_ROOT)/lib $(TL_LIB)


all:  $(LIBRARIES)

libinstrument.a: instrument.c
	gcc -c instrument.c -o instrument_static.o $(TL_CFLAGS)
	ar rcv libinstrument.a  instrument_static.o

libinstrument.so: instrument.c
	gcc -c instrument.c -o instrument_dynamic.o -fPIC $(TL_CFLAGS)
	gcc instrument_dynamic.o -shared -o libinstrument.so $(TL_LDFLAGS)

run:

clean:
	rm -f *.o $(LIBRARIES)