File: Makefile

package info (click to toggle)
eztrace 2.2.1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,012 kB
  • sloc: ansic: 37,703; sh: 1,246; cpp: 1,181; perl: 910; makefile: 738; fortran: 327; f90: 320; python: 124
file content (33 lines) | stat: -rw-r--r-- 1,302 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Copyright (C) CNRS, INRIA, Université Bordeaux 1, Télécom SudParis
# See COPYING in top-level directory.

BIN = libeztrace-autostart-example_lib.so

LIBINSTRUMENT_ROOT=$(realpath ../../../instrument/libinstrument-real)

EZTRACE_PREFIX=$(shell printenv EZTRACE_PREFIX)
EZTRACE_CFLAGS=-I$(EZTRACE_PREFIX)/include/ -I$(EZTRACE_PREFIX)/include/fxt
EZTRACE_LDFLAGS=-Wl,--rpath,$(EZTRACE_PREFIX)/lib/ -L$(EZTRACE_PREFIX)/lib -leztrace

all: $(BIN)

instrument_pptrace.o: instrument_pptrace.c
	$(CC) -c instrument_pptrace.c -fPIC $(EZTRACE_CFLAGS) -I$(LIBINSTRUMENT_ROOT) -O3

libeztrace-autostart-example_lib.so: instrument_pptrace.o
	$(CC) -shared -o $@ $< $(EZTRACE_LDFLAGS) -Wl,--rpath,$(LIBINSTRUMENT_ROOT) -L$(LIBINSTRUMENT_ROOT) -linstrument

run:
	@for i in $(TARGETS); do \
		echo ================================================================================; \
		echo Running EZTrace on `basename $$i` for real-life instrumentation; \
		echo ================================================================================; \
		for j in {1..$(NBRUNS)}; do \
			EZTRACE_LIBRARY_PATH=$(CURDIR) EZTRACE_TRACE=example_lib $(EZTRACE_PREFIX)/bin/eztrace_pptrace $$i | grep seconds | xargs echo | cut -f 1 -d " " | xargs echo -n; \
			echo -n " "; \
		done; \
		echo; \
	done

clean:
	rm -f $(BIN)