aboutsummaryrefslogtreecommitdiff
blob: 01c92f1428e7d6ee5b98591a4f37e720162f40c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
all: hookfs file_hook.so

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

file_hook.so: file_hook.o
	ld -shared -o file_hook.so -ldl -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

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/bin/"
	cp hookfs emerge_strict "${DESTDIR}/usr/bin/"
	ln -s "${DESTDIR}/usr/lib/autodep/autodep" "${DESTDIR}/usr/bin/"

clean:
	rm -f hookfs file_hook.o file_hook.so