source: proto/u8u16/src/Makefile @ 2550

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

Updated project with PAPI support.

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