Permalink
Browse files

test library linking

  • Loading branch information...
pyrovski committed Jun 19, 2012
1 parent c7fa012 commit 63743d9d7de9db9dde7642656a89d82279b7a640
Showing with 8 additions and 3 deletions.
  1. +8 −3 makefile
View
@@ -1,13 +1,18 @@
all: wattsup wattsup.so
targets=wattsup libwattsup.so test_library
all: $(targets)
wattsup: wattsup.c util.c config.c globals.c
wattsup.so: util.c config.c globals.c
libwattsup.so: util.c config.c globals.c
$(CC) -fPIC -shared -Wl,-soname,$@ -o $@ $^
test_library: test_library.c libwattsup.so
$(CC) -fPIC test_library.c -o $@ -L./ -lwattsup
install: all
install -m 0555 wattsup /usr/local/bin/
install -m 0444 wattsup.so /usr/local/lib/
clean:
rm -f *~ wattsup wattsup.so
rm -f *~ $(targets)

0 comments on commit 63743d9

Please sign in to comment.