source: proto/parabix2/src/Makefile @ 2280

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

Updated include path and Makefile.

File size: 3.2 KB
Line 
1OUTFILE=xmlwf
2SRCFILE=xmlwf.cpp
3TEST=run_all.py
4PERF=perf_script.py
5
6ID_SRCFILE=id.cpp
7DIV2_SRCFILE=div2.cpp
8LOGBASE2_SRCFILE=logbase2.cpp
9DIV2_LOGBASE2_SRCFILE=div2_logbase2.cpp
10BIT_BYTE_SRCFILE=bit_byte.cpp
11
12CC= g++ $(CFLAGS)
13CFLAGS= $(SSE) -O3
14SSE=-msse2 #-msse4.1 -DUSE_PTEST #-mssse3 -msse4.1 -msse4.2
15INCLUDES=-I../util -I../lib/
16
17PAPI_DIR=/usr/local/papi
18
19ARCH=$(shell getconf LONG_BIT)
20ifeq ($(ARCH),32)
21    AFLAGS=-march=pentium4
22    CODE_CLOCKER=-DCODE_CLOCKER -I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi
23else
24    AFLAGS=-march=nocona -m64
25    CODE_CLOCKER=-DCODE_CLOCKER -I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi
26endif
27
28
29
30avx:    $(SRCFILE)
31        $(CC) -o $(OUTFILE) $(SRCFILE) $(INCLUDES) -march=nocona -m64 -mavx
32
33all:    $(SRCFILE)
34        $(CC) -o $(OUTFILE) $(SRCFILE) $(INCLUDES) $(AFLAGS) 
35
36threads:        $(SRCFILE)
37        g++ -O3 -msse2 -o $(OUTFILE) $(SRCFILE) $(INCLUDES) $(AFLAGS) -lpthread -DBUFFER_PROFILING
38
39papi_profiling: $(SRCFILE)
40        $(CC) -o $(OUTFILE) $(SRCFILE) $(INCLUDES) $(AFLAGS) $(CODE_CLOCKER)
41
42buffer_profiling: $(SRCFILE)
43        $(CC) -o $(OUTFILE) $(SRCFILE) $(INCLUDES) $(AFLAGS) -DBUFFER_PROFILING
44       
45as: $(OUTFILE).s
46        as $(OUTFILE).s -o $(OUTFILE).o
47       
48as.o: $(OUTFILE).o
49        $(CC) $(OUTFILE).o -o $(OUTFILE)       
50
51test: 
52        python $(TEST)
53       
54perf:
55        python $(PERF) 
56
57clean: 
58        rm -f $(OUTFILE) $(OUTFILE).s $(OUTFILE).o id div2 logbase2 div2_logbase2 bit_byte
59
60asm:  $(SRCFILE)
61        $(CC) -o $(OUTFILE).s $(SRCFILE) $(INCLUDES) $(AFLAGS) -S -fverbose-asm
62
63# Symbol Table perf targets
64
65all_profiling_perf: buffer_profiling_perf id_profiling_perf div2_profiling_perf logbase2_profiling_perf div2_logbase2_profiling_perf bit_byte_profiling_perf
66
67buffer_profiling_perf: $(SRCFILE)
68        $(CC) -o $(OUTFILE) $(SRCFILE) $(INCLUDES) $(AFLAGS) -DBUFFER_PROFILING  -DPERF_SCRIPT
69
70id_profiling_perf: $(ID_SRCFILE)
71        $(CC) -o id $(ID_SRCFILE) $(INCLUDES) $(AFLAGS) -DID_STRATEGY -DBUFFER_PROFILING -DPERF_SCRIPT
72
73div2_profiling_perf: $(DIV2_SRCFILE)
74        $(CC) -o div2 $(DIV2_SRCFILE) $(INCLUDES) $(AFLAGS) -DDIV2_STRATEGY -DBUFFER_PROFILING -DPERF_SCRIPT
75
76logbase2_profiling_perf: $(LOGBASE2_SRCFILE)
77        $(CC) -o logbase2 $(LOGBASE2_SRCFILE) $(INCLUDES) $(AFLAGS) -DLOGBASE2_STRATEGY -DBUFFER_PROFILING -DPERF_SCRIPT
78
79div2_logbase2_profiling_perf: $(DIV2_LOGBASE2_SRCFILE)
80        $(CC) -o div2_logbase2 $(DIV2_LOGBASE2_SRCFILE) $(INCLUDES) $(AFLAGS) -DDIV2_LOGBASE2_STRATEGY -DBUFFER_PROFILING -DPERF_SCRIPT
81
82bit_byte_profiling_perf: $(BIT_BYTE_SRCFILE)
83        $(CC) -o bit_byte $(BIT_BYTE_SRCFILE) $(INCLUDES) $(AFLAGS) -DBIT_BYTE_STRATEGY -DBUFFER_PROFILING  -DPERF_SCRIPT
84
85# Symbol Table debug targets
86
87all_debug: id_debug div2_debug logbase2_debug div2_logbase2_debug bit_byte_debug
88
89id_debug: $(ID_SRCFILE)
90        $(CC) -o id $(ID_SRCFILE) $(INCLUDES) $(AFLAGS) -DID_STRATEGY  -DDUMP_SYMBOLS
91
92div2_debug: $(DIV2_SRCFILE)
93        $(CC) -o div2 $(DIV2_SRCFILE) $(INCLUDES) $(AFLAGS) -DDIV2_STRATEGY -DDUMP_SYMBOLS
94
95logbase2_debug: $(LOGBASE2_SRCFILE)
96        $(CC) -o logbase2 $(LOGBASE2_SRCFILE) $(INCLUDES) $(AFLAGS) -DLOGBASE2_STRATEGY -DDUMP_SYMBOLS
97
98div2_logbase2_debug: $(DIV2_LOGBASE2_SRCFILE)
99        $(CC) -o div2_logbase2 $(DIV2_LOGBASE2_SRCFILE) $(INCLUDES) $(AFLAGS) -DDIV2_LOGBASE2_STRATEGY -DDUMP_SYMBOLS
100
101bit_byte_debug: $(BIT_BYTE_SRCFILE)
102        $(CC) -o bit_byte $(BIT_BYTE_SRCFILE) $(INCLUDES) $(AFLAGS) -DBIT_BYTE_STRATEGY -DDUMP_SYMBOLS
103
Note: See TracBrowser for help on using the repository browser.