git » metnum-tp1.git » master » tree

[master] / Makefile

CXXFLAGS += -std=c++98 -pedantic -Wno-long-long -O2

OBJS = aritmetica.o util.o

default: calc babilonio binomial fcont fcont_int binomial_inc binomial_dec 

all: default

calc: $(OBJS) calc.o
	$(CXX) $(CXXFLAGS) $^ -o $@

babilonio: $(OBJS) babilonio.o
	$(CXX) $(CXXFLAGS) $^ -o $@

fcont: $(OBJS) fcont.o
	$(CXX) $(CXXFLAGS) $^ -o $@

fcont_int: $(OBJS) fcont_int.o
	$(CXX) $(CXXFLAGS) $^ -o $@

binomial: $(OBJS) binomial.o
	$(CXX) $(CXXFLAGS) $^ -o $@

binomial_inc: $(OBJS) binomial_inc.o
	$(CXX) $(CXXFLAGS) $^ -o $@

binomial_dec: $(OBJS) binomial_dec.o
	$(CXX) $(CXXFLAGS) $^ -o $@


clean:
	rm -f $(OBJS)
	rm -f calc.o calc
	rm -f babilonio.o babilonio
	rm -f fcont.o fcont
	rm -f fcont_int.o fcont_int
	rm -f binomial.o binomial
	rm -f binomial_inc binomial_inc.o
	rm -f binomial_dec binomial_dec.o

plot_data: all out/plot_data

out/plot_data:
	mkdir -p out
	./gen_plot_data.sh
	touch out/plot_data

plot: plot_data plot.gpi
	mkdir -p plot/
	gnuplot plot.gpi

clean_plot:
	rm -rf out/
	rm -rf plot/