-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
40 lines (32 loc) · 1.12 KB
/
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
36
37
38
39
40
CC = g++
CPPFLAGS = -std=c++11 -fPIC -fopenmp -lm -Ofast
UTIL_OBJECTS = util random hash file_graph
SAMPLER_OBJECTS = alias_methods vc_sampler edge_sampler
MAPPER_OBJECTS = lookup_mapper
OPTIMIZER_OBJECTS = pair_optimizer triplet_optimizer quadruple_optimizer
HUB_CLIS = air
LIBS= -L ./ -lsmore
all: $(UTIL_OBJECTS) $(SAMPLER_OBJECTS) $(MAPPER_OBJECTS) $(OPTIMIZER_OBJECTS) $(HUB_CLIS)
%.o: %.cpp %.h
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
$(UTIL_OBJECTS):
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o src/util/[email protected] src/util/[email protected]
ar rcs ./libsmore.a src/util/[email protected]
$(SAMPLER_OBJECTS):
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o src/sampler/[email protected] src/sampler/[email protected]
ar rcs ./libsmore.a src/sampler/[email protected]
$(MAPPER_OBJECTS):
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o src/mapper/[email protected] src/mapper/[email protected]
ar rcs ./libsmore.a src/mapper/[email protected]
$(OPTIMIZER_OBJECTS):
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o src/optimizer/[email protected] src/optimizer/[email protected]
ar rcs ./libsmore.a src/optimizer/[email protected]
$(HUB_CLIS):
$(CC) $(CPPFLAGS) hub/[email protected] $(LIBS) -o $@
clean:
rm -f src/util/*.o
rm -f src/sampler/*.o
rm -f src/mapper/*.o
rm -f src/optimizer/*.o
rm -f $(HUB_CLIS)
rm -f ./libsmore.a