-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.macosx
50 lines (42 loc) · 1.43 KB
/
Makefile.macosx
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
# Makefile for ttvplex
# Location of CLN (http://www.ginac.de/CLN/) source (expected to lie in 'cln' subdirectory)
# CLN_INC = /opt/local/include/
# Location of compiled CLN library
# CLN_LIB = /opt/local/lib/libcln.a
# Location of the compiled GMP library which is required by CLN
GMP_INC = /opt/local/include/
GMP_LIB = /opt/local/lib/
GMP_LDFLAGS = -lgmp -lgmpxx
# Include paths that should be searched
INCLUDE = -I$(GMP_INC) -I./libs/
# C compiler command. We use the GNU C++ compiler
CC = g++
# Compiler flags
CFLAGS = -O2 -g -Wall
# Linker flags
LDFLAGS = -lm $(GMP_LDFLAGS)
# Paths of third party libraries that are used
LIBS = -L$(GMP_LIB)
# Name of the executable
PROGRAMNAME = ttvplex
# Default target invoked by 'make' or 'make default'
default: main.cpp main.o global.o Simplex.o Log.o Matrix.o LPParser.o
$(CC) $(CFLAGS) $(INCLUDE) $(LIBS) $(LDFLAGS) -o $(PROGRAMNAME) main.o global.o Simplex.o Log.o Matrix.o LPParser.o
# Dependencies
main.o: main.cpp main.h
global.o: global.cpp global.h
Simplex.o: Simplex.cpp Simplex.h
Log.o: Log.cpp Log.h
Matrix.o: Matrix.cpp Matrix.h
LPParser.o: LPParser.cpp LPParser.h
# Create or refresh an object-file
# $< will be replaced by the name of the cpp-file
.cpp.o:
$(CC) -c $(CFLAGS) $(INCLUDE) $<
# Remove object files, executable and documentation
clean:
-rm -rf docs/* 2>/dev/null
-rm *.o $(PROGRAMNAME) 2>/dev/null
# Generate doxygen project documentation
doxy:
mkdir -p docs && doxygen doxygen.conf