-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (36 loc) · 1.17 KB
/
Makefile
File metadata and controls
55 lines (36 loc) · 1.17 KB
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
52
53
54
55
CC := gcc
OBJ_FLAGS := -Wall -Werror -fPIC -c
SHARED_FLAGS := -shared -fPIC
EXEC_FLAGS := -Wall -Werror
.PHONY: build build_so build_exec clean bitarray hash bloom
.DEFAULT_GOAL = build
bitarray: $(bitarray_sources)
$(CC) $(OBJ_FLAGS) bitarray/bitarray.c -o bitarray/bitarray.o
$(CC) $(SHARED_FLAGS) bitarray/bitarray.c -o bitarray/libbitarray.so
hash:
$(CC) $(OBJ_FLAGS) hash/hash.c -o hash/hash.o
$(CC) $(SHARED_FLAGS) hash/hash.c -o hash/libhash.so
bloom:
$(CC) $(OBJ_FLAGS) bloom.c -o bloom.o
$(CC) $(SHARED_FLAGS) bloom.c -o libbloom.so
build2: bloom.h bloom.c
$(CC) $(CFLAGS) $^ -o bloom.o
build_so:
$(CC) $(SHARED_FLAGS) bloom.h bloom.c \
hash/hash.h hash/hash.c \
bitarray/bitarray.h bitarray/bitarray.c \
-o libbloom.so
build_exec:
$(CC) $(EXEC_FLAGS) test.c bloom.h bloom.c \
hash/hash.h hash/hash.c \
bitarray/bitarray.h bitarray/bitarray.c \
-o bloom_test
build: hash bitarray bloom
clean:
rm bloom.o libbloom.so \
hash/hash.o hash/libhash.so \
bitarray/bitarray.o bitarray/libbitarray.so
run:
cc -o ht-example example/main.c bloom.h bloom.c hash/hash.h hash/hash.c bitarray/bitarray.h bitarray/bitarray.c
./ht-example
rm ht-example