source: proto/JSON/src/Makefile @ 791

Last change on this file since 791 was 791, checked in by ksherdy, 8 years ago

Add Pybit/Pablo? specific commands.

File size: 1.3 KB
Line 
1SRCFILE=json.c
2PYBIT_SRCFILE=pybit_json.c
3PABLO_SRCFILE=pablo_json.c
4
5OUTFILE=json
6PYBIT_OUTFILE=pybit_json
7PABLO_OUTFILE=pablo_json
8
9TEST= 
10
11CC= g++ $(CFLAGS)
12CFLAGS= $(SSE) -O3
13SSE=-msse2 #-mssse3 -msse4.1 -msse4.2
14
15OS = $(shell uname)
16ICONV_FLAGS=
17ifeq ($(OS),Darwin)
18        ICONV_FLAGS=-liconv
19endif
20
21PAPI_DIR=/usr/local/papi
22ARCH=$(shell getconf LONG_BIT)
23ifeq ($(ARCH),32)
24    AFLAGS=-march=pentium4
25    CODE_CLOCKER=-DCODE_CLOCKER -I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi
26else
27    AFLAGS=-march=nocona -m64
28    CODE_CLOCKER=-DCODE_CLOCKER -I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi
29endif
30
31pybit:  $(PYBIT_SRCFILE)
32        $(CC) -o $(PYBIT_OUTFILE) $(PYBIT_SRCFILE) $(AFLAGS) 
33
34pablo:  $(PABLO_SRCFILE)
35        $(CC) -o $(PABLO_OUTFILE) $(PABLO_SRCFILE) $(AFLAGS) 
36
37all:    $(SRCFILE)
38        $(CC) -o $(OUTFILE) $(SRCFILE) $(AFLAGS) 
39
40asm:  $(SRCFILE)
41        $(CC) -o $(OUTFILE).s $(SRCFILE) $(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: $(SRCFILE)
50        python $(TEST)
51
52clean: 
53        rm -f $(OUTFILE) $(OUTFILE).s $(OUTFILE).o $(PYBIT_OUTFILE) $(PABLO_OUTFILE)
54
55help:
56        @echo "Preprocessor Macro Defines"
57        @echo
58        @echo "Performance Timing    - CODE_CLOCKER | DBUFFER_PROFILING [PERF_SCRIPT]"
59        @echo "S2P Algorithm         - USE_S2P_IDEAL | USE_S2P_MOVEMASK"
60        @echo "Bitwise Comparision   - USE_PTEST"   
61
Note: See TracBrowser for help on using the repository browser.