forked from aaronmcdaid/MaximalCliques
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
66 lines (50 loc) · 2.38 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
SHELL=bash
.PHONY: gitstatus.txt help clean
BITS=
CC=g++
#BITS=-m32
#BITS=-m64
all: justTheCliques cp5
clean:
-rm tags justTheCliques cp5 *.o */*.o
tags:
ctags *.[ch]pp
#-Wclobbered -Wempty-body \ -Wignored-qualifiers -Woverride-init \ -Wtype-limits -Wunused-but-set-parameter
# I'm including most of the -Wextra flags, but I want rid of the enum-in-conditional warning from boost
PROFILE= -O3 -std=gnu++98 #-ggdb -pg #-DNDEBUG # http://linux.die.net/man/1/gcc
CFLAGS= \
-Wmissing-field-initializers \
-Wsign-compare \
-Wunused-parameter \
-Wunused \
-Wnon-virtual-dtor \
-Wall -Wformat -Werror ${PROFILE} -Wextra # -Wconversion
#-Wuninitialized \
#CXXFLAGS= ${BITS} -g
LDFLAGS+= ${PROFILE}
#CXXFLAGS= ${BITS} -O3 -p -pg ${CFLAGS} # -DNDEBUG
CXXFLAGS= ${BITS} ${CFLAGS} # -DNDEBUG
#CXXFLAGS= -O2
justTheCliques: justTheCliques.o cliques.o graph/weights.o graph/loading.o graph/network.o graph/saving.o graph/graph.o graph/bloom.o graph/stats.o cmdline.o
cp5: cp5.o comments.o cliques.o graph/weights.o graph/loading.o graph/network.o graph/saving.o graph/graph.o graph/bloom.o graph/stats.o cmdline-cp5.o clustering/components.o
mscp: mscp.o comments.o graph/weights.o graph/loading.o graph/network.o graph/graph.o graph/bloom.o graph/stats.o cmdline-mscp.o
cmdline.c.FORCE:
# remake cmdline.c . But it's OK unless you change the .ggo file. You'll need gengetopt(1) to be able to run this.
gengetopt --unamed-opts < cmdline.ggo
cmdline.o: cmdline.c
gcc -Wall cmdline.c -o cmdline.o -c
cmdline-%.c.FORCE:
# remake cmdline-%.c . But it's OK unless you change the .ggo file. You'll need gengetopt(1) to be able to run this.
gengetopt --unamed-opts -F cmdline-$* < cmdline-$*.ggo
cmdline-%.o: cmdline-%.c
gcc -Wall cmdline-$*.c -o cmdline-$*.o -c
comments.o: comments.cc.FORCE
g++ -c comments.cc -o comments.o
comments.cc.FORCE:
@echo '#include "comments.hh"' > comments.cc
@echo "const char commentSlashes[] =" >> comments.cc
@echo -n '"/''//git: ' >> comments.cc
@{ git log || echo commit "??????"; } | egrep commit | head -n1 | cut -b8-13 | tr -d '\n' >> comments.cc
@echo '" "\n"' >> comments.cc
@egrep '/'// *.?pp Makefile -h | sed -re 's/.*(\/\/\/.*)$$/"\1" "\\n"/' >> comments.cc
@echo ";" >> comments.cc