aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: b3e5061ef73550d2934699feaf072d326bf1495f (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
CFLAGS = -O2 -Wall -Wextra -Werror -Iinclude

all: task4

build:
	mkdir -p build

build/roots.o: src/roots.c build
	$(CC) $(CFLAGS) -c -o $@ $<

build/integral.o: src/integral.c build 
	$(CC) $(CFLAGS) -c -o $@ $<

task4: build/roots.o build/integral.o src/main.c 
	$(CC) $(CFLAGS) -o $@ $^ -lm -ldl 

.PHONY: run clean

run: task4
	./task4

clean:
	rm -f build/*.o task4