source: trunk/symbol_table/pablo_out/Makefile @ 2281

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

Updated Makefile.

File size: 3.9 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
19INCLUDES=-I../lib/
20
21###########################################################################
22# Perf Builds
23###########################################################################
24id: main.cpp
25        $(CC) -o id main.cpp $(AFLAGS) $(INCLUDES) -DID_STRATEGY -DBUFFER_PROFILING  #-DID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG #-DHASH_TABLE_HPP_DEBUG
26
27div2: main.cpp
28        $(CC) -o div2 main.cpp $(AFLAGS) $(INCLUDES) -DDIV2_STRATEGY -DBUFFER_PROFILING  #-DHASH_TABLE_HPP_DEBUG #-DID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG
29
30logbase2: main.cpp
31        $(CC) -o logbase2 main.cpp $(AFLAGS) $(INCLUDES) -DLOGBASE2_STRATEGY -DBUFFER_PROFILING  #-DID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG  #-DHASH_TABLE_HPP_DEBUG
32
33div2_logbase2: main.cpp
34        $(CC) -o div2_logbase2 main.cpp $(AFLAGS) $(INCLUDES) -DDIV2_LOGBASE2_STRATEGY -DBUFFER_PROFILING  #-DID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG  #-DHASH_TABLE_HPP_DEBUG
35
36bit_byte: main.cpp
37        $(CC) -o bit_byte main.cpp $(AFLAGS) $(INCLUDES) -DBIT_BYTE_STRATEGY -DBUFFER_PROFILING  #-DID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG  #-DHASH_TABLE_HPP_DEBUG
38
39###########################################################################
40# Diff Test Builds
41###########################################################################
42id_diff_test: id
43        $(CC) -o id main.cpp $(AFLAGS) $(INCLUDES) -DID_STRATEGY -DIDENTITY_TEST
44        python $(TEST_SCRIPT) id -d
45        diff -rq --exclude=".svn" $(TEST_SRC_DIR) $(TEST_DST_DIR) || exit 0
46
47div2_diff_test: div2
48        $(CC) -o div2 main.cpp $(AFLAGS) $(INCLUDES) -DDIV2_STRATEGY -DIDENTITY_TEST
49        python $(TEST_SCRIPT) div2 -d
50        diff -rq --exclude=".svn" $(TEST_SRC_DIR) $(TEST_DST_DIR) || exit 0
51
52logbase2_diff_test: logbase2
53        $(CC) -o logbase2 main.cpp $(AFLAGS) $(INCLUDES) -DLOGBASE2_STRATEGY -DIDENTITY_TEST
54        python $(TEST_SCRIPT) logbase2 -d
55        diff -rq --exclude=".svn" $(TEST_SRC_DIR) $(TEST_DST_DIR) || exit 0
56
57div2_logbase2_diff_test: div2_logbase2
58        $(CC) -o div2_logbase2 main.cpp $(AFLAGS) $(INCLUDES) -DDIV2_LOGBASE2_STRATEGY -DIDENTITY_TEST
59        python $(TEST_SCRIPT) div2_logbase2 -d
60        diff -rq --exclude=".svn" $(TEST_SRC_DIR) $(TEST_DST_DIR) || exit 0
61
62bit_byte_diff_test: bit_byte
63        $(CC) -o bit_byte main.cpp $(AFLAGS) $(INCLUDES) -DBIT_BYTE_STRATEGY -DIDENTITY_TEST
64        python $(TEST_SCRIPT) bit_byte -d
65        diff -rq --exclude=".svn" $(TEST_SRC_DIR) $(TEST_DST_DIR) || exit 0
66
67###########################################################################
68# GID Test Builds
69###########################################################################
70id_gid_test:
71        $(CC) -o id main.cpp $(AFLAGS) $(INCLUDES) -DID_STRATEGY -DGID_TEST
72        python $(TEST_SCRIPT) id -g
73
74div2_gid_test:
75        $(CC) -o div2 main.cpp $(AFLAGS) $(INCLUDES) -DDIV2_STRATEGY -DGID_TEST
76        python $(TEST_SCRIPT) div2 -g
77
78logbase2_gid_test:
79        $(CC) -o logbase2 main.cpp $(AFLAGS) $(INCLUDES) -DLOGBASE2_STRATEGY -DGID_TEST
80        python $(TEST_SCRIPT) logbase2 -g
81
82div2_logbase2_gid_test:
83        $(CC) -o div2_logbase2 main.cpp $(AFLAGS) $(INCLUDES) -DDIV2_LOGBASE2_STRATEGY -DGID_TEST
84        python $(TEST_SCRIPT) div2_logbase2 -g
85
86bit_byte_gid_test:
87        $(CC) -o bit_byte main.cpp $(AFLAGS) $(INCLUDES) -DBIT_BYTE_STRATEGY -DGID_TEST
88        python $(TEST_SCRIPT) bit_byte -g
89
90clean:
91        rm -Rf id div2 logbase2 div2_logbase2 bit_byte $(TEST_DST_DIR)
92
93# 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.