aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bersenev <bay@hackerdom.ru>2011-11-07 15:25:50 +0000
committerAlexander Bersenev <bay@hackerdom.ru>2011-11-07 15:25:50 +0000
commitf977b3fa9027da066809d42adad3eb479c488a2c (patch)
tree1d5c57677d58ae625a549b7daeaba901b01f2a8d /Makefile
parentfixed a bug when some application using hooked functions before hook library ... (diff)
downloadautodep-f977b3fa9027da066809d42adad3eb479c488a2c.tar.gz
autodep-f977b3fa9027da066809d42adad3eb479c488a2c.tar.bz2
autodep-f977b3fa9027da066809d42adad3eb479c488a2c.zip
Peter Volkov's patch to fix building
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 10 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 01c92f1..0e4c2fc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,24 +1,26 @@
all: hookfs file_hook.so
+libdir ?= lib
+
hookfs: src/hook_fusefs/hookfs.c
$(CC) -std=c99 -Wall `pkg-config fuse --cflags --libs` -lulockmgr \
- $(CFLAGS) $(LDFLAGS) src/hook_fusefs/hookfs.c -o hookfs
+ $(CFLAGS) $(LDFLAGS) src/hook_fusefs/hookfs.c -o hookfs
file_hook.so: file_hook.o
- ld -shared -o file_hook.so -ldl -lc file_hook.o
+ ld -ldl $(RAW_LDFLAGS) -shared -o file_hook.so -lc file_hook.o
file_hook.o: src/hook_lib/file_hook.c
- cc -Wall -fPIC -o file_hook.o -c src/hook_lib/file_hook.c
+ $(CC) -Wall -fPIC -o file_hook.o -c src/hook_lib/file_hook.c
install:
- mkdir -p "${DESTDIR}/usr/lib/"
- cp file_hook.so "${DESTDIR}/usr/lib/"
- cp -R src/autodep "${DESTDIR}/usr/lib/"
- cp -R portage_with_autodep "${DESTDIR}/usr/lib/"
+ mkdir -p "${DESTDIR}/usr/$(libdir)/"
+ cp file_hook.so "${DESTDIR}/usr/$(libdir)/"
+ cp -R src/autodep "${DESTDIR}/usr/$(libdir)/"
+ cp -R portage_with_autodep "${DESTDIR}/usr/$(libdir)/"
mkdir -p "${DESTDIR}/usr/bin/"
cp hookfs emerge_strict "${DESTDIR}/usr/bin/"
- ln -s "${DESTDIR}/usr/lib/autodep/autodep" "${DESTDIR}/usr/bin/"
+ ln -s "${DESTDIR}/usr/$(libdir)/autodep/autodep" "${DESTDIR}/usr/bin/"
clean:
rm -f hookfs file_hook.o file_hook.so