source: trunk/symbol_table/pablo_out/Makefile @ 2178

Last change on this file since 2178 was 2178, checked in by ksherdy, 7 years ago

Restructuring.

File size: 3.7 KB
Line 
1CC= g++ $(CFLAGS) -O3 #-fno-inline #-g
2SSE=-msse2 #-mssse3 #-msse4.2
3CFLAGS= $(SSE)
4
5PAPI_DIR=/usr/local/papi-4.0.0
6ARCH=$(shell getconf LONG_BIT)
7ifeq ($(ARCH),32)
8        AFLAGS=-march=pentium4
9        PAPI=-DPAPI -I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi
10else
11        AFLAGS=-march=nocona -m64
12        PAPI=-DPAPI -I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi
13endif
14
15TEST_SCRIPT = ../test/run_tests.py
16TEST_SRC_DIR = ../test/pin
17TEST_DST_DIR = ../test/pout
18
19###########################################################################
20# Perf Builds
21###########################################################################
22id: 
23        $(CC) -o id main.cpp $(AFLAGS) -DID_STRATEGY -DBUFFER_PROFILING  #-DID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG #-DHASH_TABLE_HPP_DEBUG
24
25div2: 
26        $(CC) -o div2 main.cpp $(AFLAGS) -DDIV2_STRATEGY -DBUFFER_PROFILING  #-DHASH_TABLE_HPP_DEBUG #-DID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG
27
28logbase2: 
29        $(CC) -o logbase2 main.cpp $(AFLAGS) -DLOGBASE2_STRATEGY -DBUFFER_PROFILING  #-DID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG  #-DHASH_TABLE_HPP_DEBUG
30
31div2_logbase2: 
32        $(CC) -o div2_logbase2 main.cpp $(AFLAGS) -DDIV2_LOGBASE2_STRATEGY -DBUFFER_PROFILING  #-DID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG  #-DHASH_TABLE_HPP_DEBUG
33
34bit_byte: 
35        $(CC) -o bit_byte main.cpp $(AFLAGS) -DBIT_BYTE_STRATEGY -DBUFFER_PROFILING  #-DID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG  #-DHASH_TABLE_HPP_DEBUG
36
37###########################################################################
38# Diff Test Builds
39###########################################################################
40id_diff_test: id
41        $(CC) -o id main.cpp $(AFLAGS) -DID_STRATEGY -DIDENTITY_TEST
42        python $(TEST_SCRIPT) id -d
43        diff -rq --exclude=".svn" $(TEST_SRC_DIR) $(TEST_DST_DIR) || exit 0
44
45div2_diff_test: div2
46        $(CC) -o div2 main.cpp $(AFLAGS) -DDIV2_STRATEGY -DIDENTITY_TEST
47        python $(TEST_SCRIPT) div2 -d
48        diff -rq --exclude=".svn" $(TEST_SRC_DIR) $(TEST_DST_DIR) || exit 0
49
50logbase2_diff_test: logbase2
51        $(CC) -o logbase2 main.cpp $(AFLAGS) -DLOGBASE2_STRATEGY -DIDENTITY_TEST
52        python $(TEST_SCRIPT) logbase2 -d
53        diff -rq --exclude=".svn" $(TEST_SRC_DIR) $(TEST_DST_DIR) || exit 0
54
55div2_logbase2_diff_test: div2_logbase2
56        $(CC) -o div2_logbase2 main.cpp $(AFLAGS) -DDIV2_LOGBASE2_STRATEGY -DIDENTITY_TEST
57        python $(TEST_SCRIPT) div2_logbase2 -d
58        diff -rq --exclude=".svn" $(TEST_SRC_DIR) $(TEST_DST_DIR) || exit 0
59
60bit_byte_diff_test: bit_byte
61        $(CC) -o bit_byte main.cpp $(AFLAGS) -DBIT_BYTE_STRATEGY -DIDENTITY_TEST
62        python $(TEST_SCRIPT) bit_byte -d
63        diff -rq --exclude=".svn" $(TEST_SRC_DIR) $(TEST_DST_DIR) || exit 0
64
65###########################################################################
66# GID Test Builds
67###########################################################################
68id_gid_test:
69        $(CC) -o id main.cpp $(AFLAGS) -DID_STRATEGY -DGID_TEST
70        python $(TEST_SCRIPT) id -g
71
72div2_gid_test:
73        $(CC) -o div2 main.cpp $(AFLAGS) -DDIV2_STRATEGY -DGID_TEST
74        python $(TEST_SCRIPT) div2 -g
75
76logbase2_gid_test:
77        $(CC) -o logbase2 main.cpp $(AFLAGS) -DLOGBASE2_STRATEGY -DGID_TEST
78        python $(TEST_SCRIPT) logbase2 -g
79
80div2_logbase2_gid_test:
81        $(CC) -o div2_logbase2 main.cpp $(AFLAGS) -DDIV2_LOGBASE2_STRATEGY -DGID_TEST
82        python $(TEST_SCRIPT) div2_logbase2 -g
83
84bit_byte_gid_test:
85        $(CC) -o bit_byte main.cpp $(AFLAGS) -DBIT_BYTE_STRATEGY -DGID_TEST
86        python $(TEST_SCRIPT) bit_byte -g
87
88clean:
89        rm -Rf id div2 logbase2 div2_logbase2 bit_byte $(TEST_DST_DIR)
90
91# valgrind --tool=callgrind --callgrind-out-file=./callgrind.out ./logbase2 ../test/in/\(1_1000_10\)_\(2_1000_10\)_\(3_1000_10\)_\(4_1000_10\)_\(5_1000_10\)_\(6_1000_10\)_\(7_1000_10\)_\(8_1000_10\)_\(9_1000_10\)_\(10_1000_10\)_\(11_1000_10\)_\(12_1000_10\)_\(13_1000_10\)_\(14_1000_10\)_\(15_1000_10\)_\(16_1000_10\)_\(17_1000_10\)_\(18_1000_10\)_\(19_1000_10\)_1_1.test
Note: See TracBrowser for help on using the repository browser.