2018-03-23 12:05:32 +08:00
|
|
|
|
|
|
|
.SUFFIXES:
|
|
|
|
#
|
|
|
|
.SUFFIXES: .cpp .o .c .h
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: clean cleandist
|
|
|
|
|
2018-08-07 15:24:05 +08:00
|
|
|
#CXXFLAGS = -g -std=c++11 -march=native -Wall -Wextra -Wshadow -Idependencies/double-conversion -Ldependencies/double-conversion/release
|
2018-07-30 01:09:47 +08:00
|
|
|
CXXFLAGS = -std=c++11 -O2 -march=native -Wall -Wextra -Wshadow -Idependencies/double-conversion -Ldependencies/double-conversion/release
|
2018-07-29 09:17:54 +08:00
|
|
|
LIBFLAGS = -ldouble-conversion
|
2018-04-04 12:08:51 +08:00
|
|
|
#CXXFLAGS = -std=c++11 -O2 -march=native -Wall -Wextra -Wshadow -Wno-implicit-function-declaration
|
2018-03-23 12:05:32 +08:00
|
|
|
|
|
|
|
EXECUTABLES=parse
|
|
|
|
|
2018-07-29 06:28:50 +08:00
|
|
|
EXTRA_EXECUTABLES=parsenocheesy parsenodep8
|
2018-03-23 12:05:32 +08:00
|
|
|
|
2018-07-29 09:13:09 +08:00
|
|
|
LIDDOUBLE:=dependencies/double-conversion/release/libdouble-conversion.a
|
2018-07-29 08:18:56 +08:00
|
|
|
|
2018-07-29 09:13:09 +08:00
|
|
|
LIBS=$(LIDDOUBLE)
|
2018-07-29 08:18:56 +08:00
|
|
|
|
2018-07-29 09:13:09 +08:00
|
|
|
all: $(LIBS) $(EXECUTABLES)
|
2018-07-26 10:59:40 +08:00
|
|
|
-./parse
|
2018-03-23 12:05:32 +08:00
|
|
|
|
2018-07-29 09:13:09 +08:00
|
|
|
$(LIDDOUBLE) : dependencies/double-conversion/README.md
|
2018-07-29 08:18:56 +08:00
|
|
|
cd dependencies/double-conversion/ && mkdir -p release && cd release && cmake .. && make
|
|
|
|
|
2018-08-07 15:24:05 +08:00
|
|
|
parse: main.cpp stage1_find_marks.cpp common_defs.h linux-perf-events.h
|
|
|
|
$(CXX) $(CXXFLAGS) -o parse stage1_find_marks.cpp stage2_flatten.cpp stage3_ape_machine.cpp stage4_shovel_machine.cpp main.cpp $(LIBFLAGS)
|
2018-03-23 12:05:32 +08:00
|
|
|
|
2018-07-30 01:09:47 +08:00
|
|
|
parsehisto: main.cpp common_defs.h linux-perf-events.h
|
|
|
|
$(CXX) $(CXXFLAGS) -o parsehisto main.cpp $(LIBFLAGS) -DBUILDHISTOGRAM
|
|
|
|
|
|
|
|
testflatten: parse parsenocheesy parsenodep8 parsenodep10 parsenodep12
|
2018-07-27 04:36:35 +08:00
|
|
|
for filename in jsonexamples/twitter.json jsonexamples/gsoc-2018.json jsonexamples/citm_catalog.json jsonexamples/canada.json ; do \
|
|
|
|
echo $$filename ; \
|
|
|
|
set -x; \
|
|
|
|
./parsenocheesy $$filename ; \
|
2018-07-29 06:28:50 +08:00
|
|
|
./parse $$filename ; \
|
2018-07-27 04:36:35 +08:00
|
|
|
./parsenodep8 $$filename ; \
|
2018-07-30 01:09:47 +08:00
|
|
|
./parsenodep10 $$filename ; \
|
|
|
|
./parsenodep12 $$filename ; \
|
2018-07-27 04:36:35 +08:00
|
|
|
set +x; \
|
|
|
|
done
|
|
|
|
|
|
|
|
parsenocheesy: main.cpp common_defs.h linux-perf-events.h
|
|
|
|
$(CXX) $(CXXFLAGS) -o parsenocheesy main.cpp -DSUPPRESS_CHEESY_FLATTEN
|
|
|
|
|
|
|
|
parsenodep8: main.cpp common_defs.h linux-perf-events.h
|
|
|
|
$(CXX) $(CXXFLAGS) -o parsenodep8 main.cpp -DNO_PDEP_PLEASE -DNO_PDEP_WIDTH=8
|
|
|
|
|
2018-07-30 01:09:47 +08:00
|
|
|
parsenodep10: main.cpp common_defs.h linux-perf-events.h
|
|
|
|
$(CXX) $(CXXFLAGS) -o parsenodep12 main.cpp -DNO_PDEP_PLEASE -DNO_PDEP_WIDTH=10
|
|
|
|
|
|
|
|
|
|
|
|
parsenodep12: main.cpp common_defs.h linux-perf-events.h
|
|
|
|
$(CXX) $(CXXFLAGS) -o parsenodep12 main.cpp -DNO_PDEP_PLEASE -DNO_PDEP_WIDTH=12
|
|
|
|
|
|
|
|
|
2018-07-29 08:18:56 +08:00
|
|
|
dependencies/double-conversion/README.md:
|
|
|
|
git pull && git submodule init && git submodule update && git submodule status
|
2018-03-23 12:05:32 +08:00
|
|
|
|
|
|
|
clean:
|
2018-07-29 06:28:50 +08:00
|
|
|
rm -f $(EXECUTABLES) $(EXTRA_EXECUTABLES)
|
2018-03-23 12:05:32 +08:00
|
|
|
|
|
|
|
cleandist:
|
2018-07-29 06:28:50 +08:00
|
|
|
rm -f $(EXECUTABLES) $(EXTRA_EXECUTABLES)
|