Skip to content

Commit

Permalink
update makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismoos committed May 3, 2011
1 parent f6a00c8 commit 54477b7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Makefile
Expand Up @@ -5,13 +5,15 @@ OBJECTS = build/hash_ring.o build/sha1.o build/sort.o
TEST_OBJECTS = build/hash_ring_test.o
SHARED_LIB = build/libhashring.so

lib: $(OBJECTS)
lib: bindings $(OBJECTS)
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) -o $(SHARED_LIB) -shared

test : lib $(TEST_OBJECTS)
$(CC) $(CFLAGS) $(LDFLAGS) $(TEST_OBJECTS) -lhashring -L./build -o bin/hash_ring_test
bin/hash_ring_test

bindings: erl

erl:
cd lib/erl && make

Expand Down
5 changes: 4 additions & 1 deletion lib/erl/Makefile
@@ -1,6 +1,9 @@
all: clean driver
all: ebin clean driver
erlc -o ebin src/hash_ring.erl

ebin:
mkdir -p ebin

driver:
gcc -o ebin/hash_ring_drv.so src/hash_ring_drv.c ../../hash_ring.c ../../sha1.c ../../sort.c -I../../ -I/usr/local/lib/erlang/usr/include -m32 -shared -undefined suppress -flat_namespace

Expand Down

0 comments on commit 54477b7

Please sign in to comment.