-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile-manual
79 lines (59 loc) · 1.55 KB
/
Makefile-manual
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#
# The "manual" GNU Makefile for bliss.
#
CFLAGS = -I.
CFLAGS += -g
#CFLAGS += -pg
CFLAGS += -Wall
CFLAGS += -Wextra
CFLAGS += --pedantic
CFLAGS += -O3
#CFLAGS += -DBLISS_DEBUG
CFLAGS += -DNDEBUG
CFLAGS += -fPIC
CFLAGS += -std=c++11
BUILDDIR = build
SRCDIR = src
SRCS += defs.cc
SRCS += abstractgraph.cc graph.cc digraph.cc
SRCS += orbit.cc
SRCS += partition.cc
SRCS += uintseqhash.cc
SRCS += utils.cc
SRCS += bliss_C.cc
OBJS = $(addprefix $(BUILDDIR)/, $(addsuffix .o, $(basename $(SRCS))))
GMPOBJS = $(addsuffix g, $(OBJS))
LIB =
#LIB += /usr/lib/ccmalloc.o -ldl
CC = g++
RANLIB = ranlib
AR = ar
LIB_STATIC = libbliss_static.a
LIB_SHARED = libbliss.so
all:: lib_static lib_shared bliss
gmp: lib_static_gmp lib_shared_gmp bliss_gmp
gmp: LIB += -lgmp
gmp: CFLAGS += -DBLISS_USE_GMP
$(BUILDDIR)/%.o $(BUILDDIR)/%.og: $(SRCDIR)/%.cc
$(CC) $(CFLAGS) -c -o $@ $<
lib_static: $(OBJS)
rm -f $(LIB_STATIC)
$(AR) cr $(LIB_STATIC) $(OBJS)
$(RANLIB) $(LIB_STATIC)
lib_shared: $(OBJS)
rm -f $(LIB_SHARED)
$(CC) -shared -o $(LIB_SHARED) $(OBJS)
lib_static_gmp: $(GMPOBJS)
rm -f $(LIB_STATIC)
$(AR) cr $(LIB_STATIC) $(GMPOBJS)
$(RANLIB) $(LIB_STATIC)
lib_shared_gmp: $(GMPOBJS)
rm -f $(LIB_SHARED)
$(CC) -shared -o $(LIB_SHARED) $(GMPOBJS)
bliss: $(BUILDDIR)/bliss.o $(OBJS)
$(CC) $(CFLAGS) -o bliss $(BUILDDIR)/bliss.o $(OBJS) $(LIB)
bliss_gmp: $(BUILDDIR)/bliss.og $(GMPOBJS)
$(CC) $(CFLAGS) -o bliss $(BUILDDIR)/bliss.og $(GMPOBJS) $(LIB)
clean:
rm -f bliss $(LIB_STATIC) $(LIB_SHARED) $(OBJS) $(BUILDDIR)/bliss.o $(GMPOBJS) $(BUILDDIR)/bliss.og
# DO NOT DELETE