-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
32 lines (23 loc) · 954 Bytes
/
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
# the compiler: gcc for C program, define as g++ for C++
CC = gcc
# compiler flags:
# -g adds debugging information to the executable file
# -Wall turns on most, but not all, compiler warnings
CFLAGS = -g -Wall -c -L/usr/lib -I/usr/include -fopenmp
LFLAGS = -Wall -g -fopenmp
# the build target executable:
TARGET = traffic_simulation
LIBS = -lgsl -lgslcblas -lhdf5 -lhdf5_cpp
OBJS = traffic_simulation.o vehicles.o
$(TARGET): $(OBJS)
$(CC) -std=c++11 $(LFLAGS) $(OBJS) -o $(TARGET) $(LIBS)
vehicles.o: parameters.h vehicles.h vehicles.cpp
$(CC) -std=c++11 $(CFLAGS) vehicles.cpp $(LIBS)
traffic_simulation.o: hdf_save_compress.h vehicles.h traffic_simulation.cpp
$(CC) -std=c++11 $(CFLAGS) traffic_simulation.cpp $(LIBS)
parameters.o: parameters.h
$(CC) -std=c++11 $(CFLAGS) parameters.cpp $(LIBS)
#vehicles.o: parameters.h vehicles.h vehicles.cpp
# $(CC) -std=c++11 $(CFLAGS) vehicles.cpp $(LIBS)
clean:
$(RM) $(TARGET) $(OBJS)