-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
36 lines (26 loc) · 711 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
33
34
35
TARGET = seidel
CXXFLAGS = -Wall -O2 -flto
SRCS = src/potential.cpp src/update_gauss_seidel.cpp src/electric_field.cpp \
src/initialise_boundary.cpp src/relax.cpp src/gs.cpp src/translate_y.cpp \
src/parse.cpp src/main.cpp
OBJS = $(subst .cpp,.o,$(SRCS))
HDRS = $(filter-out src/main.hpp, $(subst .cpp,.hpp,$(SRCS))) src/arguments.hpp
all: $(TARGET)
$(info)
$(TARGET): $(OBJS)
$(CXX) $(LDFLAGS) $(OBJS) -o $@
.PHONY: clean
clean:
@$(RM) -v $(OBJS)
.PHONY: cleanall
cleanall: clean
@$(RM) -v $(TARGET)
.PHONY: delete
delete:
@$(RM) -v u.dat e_x.dat e_y.dat cs.dat
.PHONY: tar
tar:
@tar -cvJf $(TARGET).tar.xz Makefile $(SRCS) $(HDRS)
.PHONY: lint
lint:
@clang-tidy $(HDRS) $(SRCS)