Skip to content

Commit

Permalink
update makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
anonymoususer110 committed Jun 10, 2021
1 parent 56718c9 commit fa6067b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#g++-10 -std=c++20 "-fcoroutines" -o test2 test.cpp reader.cpp cache.cpp process.cpp writer.cpp -lsnappy -O3 -freorder-blocks-algorithm=simple
#CDC = /usr/bin/g++-10 # Flag for implicit rules
CPP = g++
#CPP = g++

CPPFLAGS = -O3 -std=c++20 -Isnappy -Isnappy/third_party/googletest/googletest/include/ -fcoroutines -freorder-blocks-algorithm=simple -fPIC # Flag for implicit rules. Turn on debug info
CPPFLAGS = -O3 -std=c++20 -Isnappy -Isnappy/build -Isnappy/third_party/googletest/googletest/include/ -fcoroutines -freorder-blocks-algorithm=simple -fPIC # Flag for implicit rules. Turn on debug info

# Implicit rule #1: blah is built via the C linker implicit rule
# Implicit rule #2: blah.o is built via the C compilation implicit rule, because blah.c exists

#DEPS = hellomake.h

%.o: %.c
$(CPP) -c -o $@ $< $(CPPFLAGS) snappy/build/libsnappy.a snappy/build/lib/libgtest.a
$(CXX) -c -o $@ $< $(CPPFLAGS) snappy/build/libsnappy.a snappy/build/lib/libgtest.a

libarcade.a: reader.o cache.o process.o writer.o
ar rcs libarcade.a reader.o cache.o process.o writer.o snappy/build/libsnappy.a snappy/build/lib/libgtest.a
Expand All @@ -20,7 +20,7 @@ depend:
cd snappy; git submodule update --init; mkdir build; cd build && cmake ../ && make

runner: ./libarcade.a runner.cpp
$(CPP) -O3 -std=c++20 -fcoroutines -freorder-blocks-algorithm=simple -o runner runner.cpp -L. -larcade snappy/build/libsnappy.a snappy/build/lib/libgtest.a -Isnappy -Isnappy/third_party/googletest/googletest/include/
$(CXX) -O3 -std=c++20 -fcoroutines -freorder-blocks-algorithm=simple -o runner runner.cpp -L. -larcade snappy/build/libsnappy.a snappy/build/lib/libgtest.a -Isnappy -Isnappy/build -Isnappy/third_party/googletest/googletest/include/

clean: reader.o cache.o process.o writer.o libarcade.a
rm -f *.o
2 changes: 1 addition & 1 deletion src/cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ int Caches::get_values(FILE *f1, vector <string>* &values, long int position, in
char buffer1[dictsize];
if (SNAPPY){
size_t ot = fread(&buffer1,dictsize,1,f1);
snappy::string output;
string output;
snappy::Uncompress(buffer1, dictsize, &output);
this->values_cache[position] = hps::from_string<std::vector<string>>(output);
}
Expand Down
4 changes: 2 additions & 2 deletions src/writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ if (diffdict == 1){
if (st==""){
st = hps::to_string(diff);
}
snappy::string comprst;
string comprst;
if (SNAPPY){
snappy::Compress(&st[0], st.size(), &comprst);
header.dictsize = comprst.size();
Expand Down Expand Up @@ -291,7 +291,7 @@ else if (diffdict == 0){
stloc = hps::to_string(vec);
}

snappy::string comprst;
string comprst;
if (SNAPPY){
snappy::Compress(&stloc[0], stloc.size(), &comprst);
header.dictsize = comprst.size();
Expand Down

0 comments on commit fa6067b

Please sign in to comment.