Commit d5e91c9c authored by amitjans's avatar amitjans
Browse files

Delete makefile

parent 6f097906
# Programming Techniques for Scientific Simulations, HS 2021
# Define our tools and parameters, preferably using the implicit variable names.
CXX = g++
CXXFLAGS = -std=c++11
CXXFLAGS += -Wall -Wextra -Wpedantic
CXXFLAGS += -O3 -march=native
LDFLAGS = -Lintegrator # Library flags
LDLIBS = -lintegrate
# Export all variables into the environment. This will come handy further below.
# The first target is called 'all' by convention and used to delegate.
.PHONY: all
all: data/convergence.png
# Compile our code and generate an executable binary together with the library.
print_integrals: main.cpp integrator/libintegrate.a
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(LDLIBS)
# Libraries often know how to build themselves (provide their own build system).
# Exported variables will also be visible in a sub-make.
$(MAKE) -C integrator # first move to folder integrator, and then run make
# Rerun the file if either our program or the input parameter changes.
data/results.txt: print_integrals maxbins.conf
@mkdir -p data # create the directory if it doesn't exist
./print_integrals < maxbins.conf
# Regenerate the plot if the data or plotting configuration changes.
data/convergence.png: data/results.txt convergence.gnuplot
gnuplot convergence.gnuplot
# Always offer a way to clean up!
.PHONY: clean
rm -f print_integrals
rm -f *.o *.a
rm -rf data
$(MAKE) -C integrator clean
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment