source: proto/parabix2/src/Makefile @ 972

Last change on this file since 972 was 972, checked in by cameron, 8 years ago

AVX version with separate files/template.

File size: 1.3 KB
Line 
1SRCFILE=xmlwf.cpp
2OUTFILE=xmlwf
3TEST= run_all.py
4MSRCFILE = xmlwf_multipass.cpp
5
6CC= g++ $(CFLAGS)
7CFLAGS= $(SSE) -O3
8SSE=-msse2 #-msse4.1 -DUSE_PTEST #-mssse3 -msse4.1 -msse4.2
9
10OS = $(shell uname)
11ICONV_FLAGS=
12ifeq ($(OS),Darwin)
13        ICONV_FLAGS=-liconv
14endif
15
16PAPI_DIR=/usr/local/papi
17
18ARCH=$(shell getconf LONG_BIT)
19ifeq ($(ARCH),32)
20    AFLAGS=-march=pentium4
21    CODE_CLOCKER=-DCODE_CLOCKER -I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi
22else
23    AFLAGS=-march=nocona -m64 -mavx
24    CODE_CLOCKER=-DCODE_CLOCKER -I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi
25endif
26
27avx:    $(SRCFILE)
28        $(CC) -o $(OUTFILE) $(SRCFILE) -march=nocona -m64 -mavx
29
30all:    $(SRCFILE)
31        $(CC) -o $(OUTFILE) $(SRCFILE) $(AFLAGS)
32
33multi_pass:     $(SRCFILE)
34        $(CC) -o $(OUTFILE) $(MSRCFILE) $(AFLAGS)
35       
36code_clocker:   $(SRCFILE)
37        $(CC) -o $(OUTFILE) $(SRCFILE) $(AFLAGS) $(CODE_CLOCKER)
38
39buffer_profiling: $(SRCFILE)
40        $(CC) -o $(OUTFILE) $(SRCFILE) $(AFLAGS) -DBUFFER_PROFILING
41
42buffer_profiling_perf: $(SRCFILE)
43        $(CC) -o $(OUTFILE) $(SRCFILE) $(AFLAGS) -DBUFFER_PROFILING  -DPERF_SCRIPT
44
45asm:  $(SRCFILE)
46        $(CC) -o $(OUTFILE).s $(SRCFILE) $(AFLAGS) -S -fverbose-asm
47       
48as: $(OUTFILE).s
49        as $(OUTFILE).s -o $(OUTFILE).o
50       
51as.o: $(OUTFILE).o
52        $(CC) $(OUTFILE).o -o $(OUTFILE)       
53
54test: $(SRCFILE)
55        python $(TEST)
56
57clean: 
58        rm -f $(OUTFILE) $(OUTFILE).s $(OUTFILE).o
Note: See TracBrowser for help on using the repository browser.