Skip to content

Commit

Permalink
Rename test.c to sample.c
Browse files Browse the repository at this point in the history
Signed-off-by: anton <[email protected]>
  • Loading branch information
anton committed Mar 4, 2018
1 parent ec089e6 commit 97ced8c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ FairRank
data/*
.*.swp
*.o
test
sample
libfairrank.so
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ FairRank.o: FairRank.cpp
libfairrank.so: FairRank.o fairrank.h
$(CXX) $(CXXFLAGS) -shared -lc -o $@ FairRank.o

testrun: test
LD_LIBRARY_PATH=./ ./test
samplerun: sample
LD_LIBRARY_PATH=./ ./sample

test: test.c libfairrank.so
$(CC) $(CFLAGS) test.c -o $@ -L. -lfairrank
sample: sample.c libfairrank.so
$(CC) $(CFLAGS) sample.c -o $@ -L. -lfairrank

run: FairRank data/results
@./FairRank
Expand All @@ -30,6 +30,6 @@ data/results:
@echo Sample results generated to data/results

clean:
@rm -f FairRank test *.o *.so
@rm -f FairRank sample *.o *.so

.PHONY: clean run testrun
.PHONY: clean run samplerun
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ Statistics
When running FairRank statistics will be presented on Standard Output, but also
a file ``data/stats`` will be written that contains the current leaderboard.

Dynamic library
---------------

See [sample.c](sample.c) for an example of how to use libfairrank.so.
File renamed without changes.

0 comments on commit 97ced8c

Please sign in to comment.