| 1 | CC= g++ $(CFLAGS) -O3 #-g |
|---|
| 2 | SSE=-msse2 #-mssse3 #-msse4.2 |
|---|
| 3 | CFLAGS= $(SSE) |
|---|
| 4 | |
|---|
| 5 | PAPI_DIR=/usr/local/papi-4.0.0 |
|---|
| 6 | ARCH=$(shell getconf LONG_BIT) |
|---|
| 7 | ifeq ($(ARCH),32) |
|---|
| 8 | AFLAGS=-march=pentium4 |
|---|
| 9 | PAPI=-DPAPI -I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi |
|---|
| 10 | else |
|---|
| 11 | AFLAGS=-march=nocona -m64 |
|---|
| 12 | PAPI=-DPAPI -I$(PAPI_DIR)/include -L$(PAPI_DIR)/lib -lpapi |
|---|
| 13 | endif |
|---|
| 14 | |
|---|
| 15 | PABLO_COMPILER=Compiler/pablomain.py |
|---|
| 16 | PABLO_ADD_DEBUG = #-a -b |
|---|
| 17 | |
|---|
| 18 | MARKER_PREFIX=@marker_strms_ |
|---|
| 19 | MARKER_PABLO_SRC=marker_strms.py |
|---|
| 20 | MARKER_TEMPLATE=marker_strms_template.hpp |
|---|
| 21 | MARKER_OUTFILE=src/marker_strms.hpp |
|---|
| 22 | |
|---|
| 23 | HASH_PREFIX=@hash_strms_ |
|---|
| 24 | HASH_PABLO_SRC=hash_strms.py |
|---|
| 25 | HASH_TEMPLATE=hash_strms_template.hpp |
|---|
| 26 | HASH_OUTFILE=src/hash_strms.hpp |
|---|
| 27 | |
|---|
| 28 | ID_GROUP_STRMS = id_group_strms.py |
|---|
| 29 | DIV2_GROUP_STRMS = div2_group_strms.py |
|---|
| 30 | LOG2_GROUP_STRMS = log2_group_strms.py |
|---|
| 31 | |
|---|
| 32 | GROUP_PREFIX=@group_strms_ |
|---|
| 33 | GROUP_TEMPLATE=group_strms_template.hpp |
|---|
| 34 | GROUP_OUTFILE=src/group_strms.hpp |
|---|
| 35 | |
|---|
| 36 | MAIN_TEMPLATE=main_template.cpp |
|---|
| 37 | MAIN_OUTFILE=src/main.cpp |
|---|
| 38 | |
|---|
| 39 | id: markers hash id_group src/main.cpp |
|---|
| 40 | python $(PABLO_COMPILER) $(MARKER_PABLO_SRC) -t $(MAIN_OUTFILE) -l $(MARKER_PREFIX) -o $(MAIN_OUTFILE) $(PABLO_ADD_DEBUG) |
|---|
| 41 | |
|---|
| 42 | div2: markers hash div2_group src/main.cpp |
|---|
| 43 | python $(PABLO_COMPILER) $(MARKER_PABLO_SRC) -t $(MAIN_OUTFILE) -l $(MARKER_PREFIX) -o $(MAIN_OUTFILE) $(PABLO_ADD_DEBUG) |
|---|
| 44 | |
|---|
| 45 | log2: markers hash log2_group src/main.cpp |
|---|
| 46 | python $(PABLO_COMPILER) $(MARKER_PABLO_SRC) -t $(MAIN_OUTFILE) -l $(MARKER_PREFIX) -o $(MAIN_OUTFILE) $(PABLO_ADD_DEBUG) |
|---|
| 47 | |
|---|
| 48 | markers: marker_strms.py marker_strms_template.hpp |
|---|
| 49 | python $(PABLO_COMPILER) $(MARKER_PABLO_SRC) -t $(MARKER_TEMPLATE) -l $(MARKER_PREFIX) -o $(MARKER_OUTFILE) $(PABLO_ADD_DEBUG) |
|---|
| 50 | |
|---|
| 51 | hash: hash_strms.py hash_strms_template.hpp |
|---|
| 52 | python $(PABLO_COMPILER) $(HASH_PABLO_SRC) -t $(HASH_TEMPLATE) -l $(HASH_PREFIX) -o $(HASH_OUTFILE) $(PABLO_ADD_DEBUG) |
|---|
| 53 | |
|---|
| 54 | id_group: id_group_strms.py group_strms_template.hpp main_template.cpp |
|---|
| 55 | python $(PABLO_COMPILER) $(ID_GROUP_STRMS) -t $(GROUP_TEMPLATE) -l $(GROUP_PREFIX) -o $(GROUP_OUTFILE) $(PABLO_ADD_DEBUG) |
|---|
| 56 | python $(PABLO_COMPILER) $(ID_GROUP_STRMS) -t $(MAIN_TEMPLATE) -l $(GROUP_PREFIX) -o $(MAIN_OUTFILE) $(PABLO_ADD_DEBUG) |
|---|
| 57 | |
|---|
| 58 | div2_group: div2_group_strms.py group_strms_template.hpp main_template.cpp |
|---|
| 59 | python $(PABLO_COMPILER) $(DIV2_GROUP_STRMS) -t $(GROUP_TEMPLATE) -l $(GROUP_PREFIX) -o $(GROUP_OUTFILE) $(PABLO_ADD_DEBUG) |
|---|
| 60 | python $(PABLO_COMPILER) $(DIV2_GROUP_STRMS) -t $(MAIN_TEMPLATE) -l $(GROUP_PREFIX) -o $(MAIN_OUTFILE) $(PABLO_ADD_DEBUG) |
|---|
| 61 | |
|---|
| 62 | log2_group: log2_group_strms.py group_strms_template.hpp main_template.cpp |
|---|
| 63 | python $(PABLO_COMPILER) $(LOG2_GROUP_STRMS) -t $(GROUP_TEMPLATE) -l $(GROUP_PREFIX) -o $(GROUP_OUTFILE) $(PABLO_ADD_DEBUG) |
|---|
| 64 | python $(PABLO_COMPILER) $(LOG2_GROUP_STRMS) -t $(MAIN_TEMPLATE) -l $(GROUP_PREFIX) -o $(MAIN_OUTFILE) $(PABLO_ADD_DEBUG) |
|---|
| 65 | |
|---|
| 66 | clean: |
|---|
| 67 | rm -f $(MARKER_OUTFILE) $(HASH_OUTFILE) $(GROUP_OUTFILE) $(MAIN_OUTFILE) |
|---|
| 68 | |
|---|
| 69 | |
|---|