-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
35 lines (25 loc) · 982 Bytes
/
Makefile
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
tree_test_srcs=tree_test.c bitlib.c
tree_test_objs=$(tree_test_srcs:.c=.o)
cobtree_srcs=cobtree.c vebtree.c pma.c bitlib.c
cobtree_objs=$(cobtree_srcs:.c=.o)
cobtree_sh_srcs=cobtree_sh.c veb_small_height.c bitlib.c
cobtree_sh_objs=$(cobtree_sh_srcs:.c=.o)
CFLAGS=-g -O2 -Wextra -Wall `pkg-config --cflags glib-2.0`
#CFLAGS=-g -Wextra -Wall `pkg-config --cflags glib-2.0`
LIBS=-L/usr/local/lib -lpfm `pkg-config --libs glib-2.0` -lrt
%.d: %.c
@set -e; rm -f $@; \
gcc -MM $(CPPFLAGS) $< > $@.$$$$; \
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$
all: tree_test cobtree cobtree_sh
-include $(tree_test_srcs:.c=.d)
-include $(cobtree_srcs:.c=.d)
tree_test: $(tree_test_objs)
gcc -o tree_test $(tree_test_objs) `pkg-config --libs glib-2.0` -lrt
cobtree: $(cobtree_objs)
gcc -o cobtree $(cobtree_objs) `pkg-config --libs glib-2.0` -lrt
cobtree_sh: $(cobtree_sh_objs)
gcc -o cobtree_sh $(cobtree_sh_objs) $(LIBS)
clean:
$(RM) tree_test cobtree *.o