summaryrefslogtreecommitdiff
path: root/graphs-algo/Makefile
blob: 7cdaf2aec246407e53f0ba3fae5fcb2bcb4e58c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
CXX=g++
CFLAGS=-g -Wall
COMPILE=$(CXX) $(CFLAGS)

task1:
	$(COMPILE) -o task.out task1.cpp
test1: task1
	@printf "4\n4\n1 2 1\n2 3 1\n3 4 1\n4 1 1\n4\n2" | ./task.out
	@printf "Answer: \n"
	@printf "4\n4\n1 2 1\n2 3 5\n3 4 1\n4 1 2\n2\n3" | ./task.out
	@printf "Answer: \n"

task2:
	$(COMPILE) -o task.out task2.cpp
test2: task2
	@printf "" | ./task.out
	@printf "Answer: \n"

clean:
	rm -f task.out *.zip

archive: clean
	zip archive.zip *.cpp *.h