source: proto/parabix2/src/Makefile @ 553

Last change on this file since 553 was 553, checked in by ksherdy, 9 years ago

Add symbolic link to papi directory

File size: 1014 bytes
Line 
1SRCFILE=xmlwf.c
2OUTFILE=xmlwf
3TEST= run_all.py
4
5CC= g++ $(CFLAGS)
6CFLAGS= $(SSE) -O3
7SSE=-msse2 #-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    CODE_CLOCKER=-DCODE_CLOCKER -I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi
21else
22    AFLAGS=-march=nocona -m64
23    CODE_CLOCKER=-DCODE_CLOCKER -I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi
24endif
25
26all:    $(SRCFILE)
27        $(CC) -o $(OUTFILE) $(SRCFILE) $(AFLAGS)
28
29code_clocker:   $(SRCFILE)
30        $(CC) -o $(OUTFILE) $(SRCFILE) $(AFLAGS) $(CODE_CLOCKER)
31
32buffer_profiling: $(SRCFILE)
33        $(CC) -o $(OUTFILE) $(SRCFILE) $(AFLAGS) -DBUFFER_PROFILING
34
35asm:  $(SRCFILE)
36        $(CC) -o $(OUTFILE).s $(SRCFILE) $(AFLAGS) -S -fverbose-asm
37       
38as: $(OUTFILE).s
39        as $(OUTFILE).s -o $(OUTFILE).o
40       
41as.o: $(OUTFILE).o
42        $(CC) $(OUTFILE).o -o $(OUTFILE)       
43
44test: $(SRCFILE)
45        python $(TEST)
46
47clean: 
48        rm -f $(OUTFILE) $(OUTFILE).s $(OUTFILE).o
Note: See TracBrowser for help on using the repository browser.