File: Makefile

package info (click to toggle)
papi 5.7.0+dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 9,856 kB
  • sloc: ansic: 93,265; fortran: 3,338; xml: 2,460; makefile: 815; sh: 290
file content (78 lines) | stat: -rw-r--r-- 2,821 bytes parent folder | download
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File: utils/Makefile
include Makefile.target

INCLUDE = -I../testlib -I.. -I.
testlibdir=../testlib
CLOCKCORE= $(testlibdir)/clockcore.o
DOLOOPS = $(testlibdir)/do_loops.o

ALL = papi_avail papi_mem_info papi_cost papi_clockres papi_native_avail \
	papi_command_line papi_event_chooser papi_decode papi_xml_event_info \
	papi_version papi_multiplex_cost papi_component_avail papi_error_codes

%.o:%.c
	$(CC) $(CFLAGS) $(OPTFLAGS) $(INCLUDE) -c $<

default all utils: $(ALL)

papi_avail: papi_avail.o $(PAPILIB) print_header.o
	$(CC) $(LDFLAGS) -o papi_avail papi_avail.o print_header.o $(PAPILIB)

papi_clockres: papi_clockres.o $(PAPILIB) $(CLOCKCORE)
	$(CC) $(LDFLAGS) -o papi_clockres papi_clockres.o $(PAPILIB) $(CLOCKCORE) -lm

papi_command_line: papi_command_line.o $(PAPILIB) $(DOLOOPS)
	$(CC) $(LDFLAGS) -o papi_command_line papi_command_line.o $(PAPILIB) $(DOLOOPS)

papi_component_avail: papi_component_avail.o $(PAPILIB) print_header.o
	$(CC) $(LDFLAGS) -o papi_component_avail papi_component_avail.o $(PAPILIB) print_header.o

papi_cost: papi_cost.o $(PAPILIB) cost_utils.o
	$(CC) $(LDFLAGS) -o papi_cost papi_cost.o cost_utils.o $(PAPILIB) -lm

papi_decode: papi_decode.o $(PAPILIB)
	$(CC) $(LDFLAGS) -o papi_decode papi_decode.o $(PAPILIB)

papi_error_codes: papi_error_codes.o $(PAPILIB)
	$(CC) $(LDFLAGS) -o papi_error_codes papi_error_codes.o $(PAPILIB)

papi_event_chooser: papi_event_chooser.o $(PAPILIB) print_header.o
	$(CC) $(LDFLAGS) -o papi_event_chooser papi_event_chooser.o print_header.o $(PAPILIB)

papi_hybrid_native_avail: papi_hybrid_native_avail.o $(PAPILIB)
	$(CC) $(LDFLAGS) -o papi_hybrid_native_avail papi_hybrid_native_avail.o $(PAPILIB)

papi_mem_info: papi_mem_info.o $(PAPILIB)
	$(CC) $(LDFLAGS) -o papi_mem_info papi_mem_info.o $(PAPILIB)

papi_multiplex_cost: papi_multiplex_cost.o $(PAPILIB) cost_utils.o
	$(CC) $(LDFLAGS) -o papi_multiplex_cost papi_multiplex_cost.o cost_utils.o $(PAPILIB) -lm

papi_native_avail: papi_native_avail.o $(PAPILIB) print_header.o
	$(CC) $(LDFLAGS) -o papi_native_avail papi_native_avail.o $(PAPILIB) print_header.o

papi_version: papi_version.o $(PAPILIB)
	$(CC) $(LDFLAGS) -o papi_version papi_version.o $(PAPILIB)

papi_xml_event_info: papi_xml_event_info.o $(PAPILIB)
	$(CC) $(LDFLAGS) -o papi_xml_event_info papi_xml_event_info.o $(PAPILIB)



cost_utils.o: ../testlib/papi_test.h cost_utils.c
	$(CC) $(INCLUDE) $(CFLAGS) $(OPTFLAGS) -c cost_utils.c

print_header.o: print_header.h print_header.c
	$(CC) $(INCLUDE) $(CFLAGS) $(OPTFLAGS) -c print_header.c

clean:
	rm -f *.o *.stderr *.stdout core *~ $(ALL)

distclean clobber: clean
	rm -f Makefile.target

install: $(UTIL_TARGETS)
	@echo "Utilities (BINDIR) being installed in: \"$(BINDIR)\"";
	mkdir -p $(BINDIR)
	chmod go+rx $(BINDIR)
	find . -perm -100 -type f -exec cp {} $(BINDIR) \;