0
|
1 #!/bin/bash
|
|
2
|
|
3 CC=g++
|
|
4 CFLAGS= -ansi -O5 -Wall
|
|
5 LDFLAGS= -ansi -lm -Wall
|
|
6 EXEC=louvain_community louvain_convert louvain_hierarchy
|
|
7 OBJ1= graph_binary.o community.o
|
|
8 OBJ2= graph.o
|
|
9
|
|
10 all: $(EXEC)
|
|
11
|
|
12 louvain_community : $(OBJ1) main_community.o
|
|
13 $(CC) -o $@ $^ $(LDFLAGS)
|
|
14
|
|
15 louvain_convert : $(OBJ2) main_convert.o
|
|
16 $(CC) -o $@ $^ $(LDFLAGS)
|
|
17
|
|
18 louvain_hierarchy : main_hierarchy.o
|
|
19 $(CC) -o $@ $^ $(LDFLAGS)
|
|
20
|
|
21 ##########################################
|
|
22 # Generic rules
|
|
23 ##########################################
|
|
24
|
|
25 %.o: %.cpp %.h
|
|
26 $(CC) -o $@ -c $< $(CFLAGS)
|
|
27
|
|
28 %.o: %.cpp
|
|
29 $(CC) -o $@ -c $< $(CFLAGS)
|
|
30
|
|
31 clean:
|
|
32 rm -f *.o *~ $(EXEC)
|