blob: f590d499fd9ae4424a57d7585f7fc431d4bfeb86 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
cflags = -Wunused-function -Wunused-variable -Wconversion -Wformat
-I include -O2
rule liba
gcc -o $out.tmp.o $in $cflags -r
objcopy --keep-global-symbols=liballoc.api $out.tmp.o $out.fixed.o
ar rcs $out $out.fixed.o
rm $out.tmp.o $out.fixed.o
rule libso
gcc -o $out $in $cflags -shared -Wl,-version-script liballoc.lds
rule cc
gcc -o $out $in $cflags
rule mkdir
mkdir $out
target build
mkdir
target build/liballoc.a
liba src/allocator.c | include/allocator.h build
target build/liballoc.so
libso src/allocator.c | include/allocator.h build
target build/test
cc src/test.c build/liballoc.a | build
command clean
rm -rf build
command cleanall
just clean
command install
install -m755 build/liballoc.a -t "/usr/local/lib"
install -m755 build/liballoc.so -t "/usr/local/lib"
install -m644 include/allocator.h -t "/usr/local/include"
command uninstall
rm -f "/usr/local/lib/liballoc.a"
rm -f "/usr/local/lib/liballoc.so"
rm -f "/usr/local/include/allocator.h"
command all
just build/liballoc.a build/liballoc.so build/test
|