-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (31 loc) · 1.15 KB
/
Makefile
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
CC = gcc
CXX = g++
CFLAGS = -Wall -std=gnu99 -O0 -g -march=native
CXXFLAGS = -Wall -O0 -g -march=native
PLUGININCLUDE = `$(CC) --print-file-name=plugin`/include
help:
@echo "Please specify target that corresponds to your GCC version."
@echo "Available targets: gcc45 gcc46 gcc47 gcc48 gcc49"
clean:
rm -fr test{1,2}.h.gch recordsize.so rs-report
gcc45: recordsize_c report
gcc46: recordsize_c report
gcc47: recordsize_c report
gcc48: recordsize_cpp report
gcc49: recordsize_cpp report
recordsize_c:
$(CC) $(CFLAGS) -shared -fpic -I $(PLUGININCLUDE) -o recordsize.so \
rs-plugin-api.c rs-plugin.c rs-common.c
recordsize_cpp:
$(CXX) $(CXXFLAGS) -D__STDC_LIMIT_MACROS -shared -fpic -I $(PLUGININCLUDE) -o recordsize.so \
rs-plugin-api.c rs-plugin.c rs-common.c
report:
$(CC) $(CFLAGS) -o rs-report rs-report.c rs-common.c -liberty
test1:
$(CXX) -fplugin=./recordsize.so -fplugin-arg-recordsize-process-templates -fplugin-arg-recordsize-print-all test1.h
test2:
$(CXX) -fplugin=./recordsize.so -fplugin-arg-recordsize-process-templates -fplugin-arg-recordsize-print-all test2.h
dump1:
$(CXX) -fdump-tree-all test1.h
dump2:
$(CXX) -fdump-tree-all test2.h