-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
56 lines (44 loc) · 2.05 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
##########################################################################################
# Specify library locations here (add or remove "#" marks to comment/uncomment lines for your platform)
# Mac OS X
# DDG_INCLUDE_PATH =
# DDG_LIBRARY_PATH =
# DDG_BLAS_LIBS = -framework Accelerate
# DDG_SUITESPARSE_LIBS = -lspqr -lumfpack -lcholmod -lmetis -lcolamd -lccolamd -lcamd -lamd -ltbb -lm -lsuitesparseconfig
# DDG_OPENGL_LIBS = -framework OpenGL -framework GLUT
# # Linux
# modifying includes to /usr/local/include .. suitesparse, etc.
DDG_INCLUDE_PATH =
DDG_LIBRARY_PATH =
DDG_BLAS_LIBS = -llapack -lblas -lgfortran
DDG_SUITESPARSE_LIBS = -lspqr -lcholmod -lcolamd -lccolamd -lcamd -lamd -lm -lumfpack -lamd #-lmetis
DDG_OPENGL_LIBS = -lGL -lGLU -lglut -lGLEW -lX11
# # Windows / Cygwin
# DDG_INCLUDE_PATH = -I/usr/include/opengl -I/usr/include/suitesparse
# DDG_LIBRARY_PATH = -L/usr/lib/w32api -L/usr/lib/suitesparse
# DDG_BLAS_LIBS = -llapack -lblas
# DDG_SUITESPARSE_LIBS = -lspqr -lcholmod -lcolamd -lccolamd -lcamd -lamd -lm
# DDG_OPENGL_LIBS = -lglut32 -lglu32 -lopengl32
########################################################################################
TARGET = connection
CC = g++
LD = g++
CFLAGS = -O3 -Wall -Werror -ansi -pedantic $(DDG_INCLUDE_PATH) -I./include -I./src
LFLAGS = -O3 -Wall -Werror -ansi -pedantic $(DDG_LIBRARY_PATH)
# CFLAGS = -O3 -Wall -Werror -ansi -pedantic -I./include -I./src
# LFLAGS = -O3 -Wall -Werror -ansi -pedantic
LIBS = $(DDG_OPENGL_LIBS) $(DDG_SUITESPARSE_LIBS) $(DDG_BLAS_LIBS)
########################################################################################
## !! Do not edit below this line
HEADERS := $(wildcard include/*.h)
SOURCES := $(wildcard src/*.cpp)
OBJECTS := $(addprefix obj/,$(notdir $(SOURCES:.cpp=.o)))
all: $(TARGET)
$(TARGET): $(OBJECTS)
$(LD) $(OBJECTS) -o $(TARGET) $(CFLAGS) $(LFLAGS) $(LIBS)
obj/%.o: src/%.cpp ${HEADERS}
$(CC) -c $< -o $@ $(CFLAGS)
clean:
rm -f $(OBJECTS)
rm -f $(TARGET)
rm -f $(TARGET).exe