source: proto/JSON/src/Makefile @ 741

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

Add template.c, json.c, json.c Makefile.

File size: 1.0 KB
Line 
1SRCFILE=json.c
2OUTFILE=json
3TEST= 
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
16ARCH=$(shell getconf LONG_BIT)
17ifeq ($(ARCH),32)
18    AFLAGS=-march=pentium4
19    CODE_CLOCKER=-DCODE_CLOCKER -I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi
20else
21    AFLAGS=-march=nocona -m64
22    CODE_CLOCKER=-DCODE_CLOCKER -I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi
23endif
24
25all:    $(SRCFILE)
26        $(CC) -o $(OUTFILE) $(SRCFILE) $(AFLAGS) 
27
28asm:  $(SRCFILE)
29        $(CC) -o $(OUTFILE).s $(SRCFILE) $(AFLAGS) -S -fverbose-asm
30       
31as: $(OUTFILE).s
32        as $(OUTFILE).s -o $(OUTFILE).o
33       
34as.o: $(OUTFILE).o
35        $(CC) $(OUTFILE).o -o $(OUTFILE)       
36
37test: $(SRCFILE)
38        python $(TEST)
39
40clean: 
41        rm -f $(OUTFILE) $(OUTFILE).s $(OUTFILE).o
42
43help:
44        @echo "Preprocessor Macro Defines"
45        @echo
46        @echo "Performance Timing    - CODE_CLOCKER | DBUFFER_PROFILING [PERF_SCRIPT]"
47        @echo "S2P Algorithm         - USE_S2P_IDEAL | USE_S2P_MOVEMASK"
48        @echo "Bitwise Comparision   - USE_PTEST"   
49
Note: See TracBrowser for help on using the repository browser.