source: proto/parabix2/src/Makefile @ 2171

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

Refactor src structure. Moved utility classes out to a separate dir.

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