summaryrefslogtreecommitdiff
path: root/makefile
blob: 08d99720ee833d342bd54343ad61ac3b4e7e0cb0 (plain)
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
PRG=ptracker

CC=g++
#CC=mpic++
CXXFLAGS=-Wall -Wextra -pedantic -O0 -fopenmp
#LFLAGS=-I/home/iozgen/Documents/software/hdf5/include -L/home/iozgen/Documents/software/hdf5/lib
LFLAGS=-I/global/home/users/iozgen/stuff/hdf5/include -L/global/home/users/iozgen/stuff/hdf5/lib
SRC=main.cpp
LIB=-lm -lhdf5 -lhdf5_cpp
OBJ=$(SRC:.cpp=.o)

all:$(PRG)

$(PRG): $(OBJ)
	echo "[OK] linking objects"
	$(CC) $(LFLAGS) $(CXXFLAGS) $(OBJ) -o $@ $(LIB)

%.o: %.cpp
	echo "[OK] building objects"
	$(CC) $(LFLAGS) $(CXXFLAGS) -c $< -o $@

run: $(PRG)
	./$(PRG) input/options.input

tag: $(SRC)
	etags *.hpp *.cpp

indent: $(SRC)
	astyle --style=kr *.hpp *.cpp

clean:
	rm -f $(OBJ) *.orig

cleanall:
	make clean
	rm -f *.dat; rm -f *.png *.csv TAGS $(PRG)

.PHONY: all tag clean cleanall