-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (29 loc) · 1002 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
36
37
38
39
40
41
42
43
CC = gcc
CFLAGS = -std=c99 -g -pedantic -Wall -Wmissing-field-initializers -D_POSIX_C_SOURCE=200809L
OPTFLAGS = -lm
.PHONY: clean
all: libinterpolazione test
vandermonde: src/vandermonde.c
$(CC) $(CFLAGS) $^ -c -o $@.o $(OPTFLAGS)
newton: src/newton.c
$(CC) $(CFLAGS) $^ -c -o $@.o $(OPTFLAGS)
lagrange: src/lagrange.c
$(CC) $(CFLAGS) $^ -c -o $@.o $(OPTFLAGS)
chebyshev: src/chebyshev.c
$(CC) $(CFLAGS) $^ -c -o $@.o $(OPTFLAGS)
spline: src/spline.c
$(CC) $(CFLAGS) $^ -c -o $@.o $(OPTFLAGS)
points: src/points.c
$(CC) $(CFLAGS) $^ -c -o $@.o $(OPTFLAGS)
libinterpolazione: vandermonde newton chebyshev lagrange spline points
@echo "Compilo Libreria"
ar rvs $@.a vandermonde.o newton.o chebyshev.o lagrange.o spline.o points.o
test: src/test.c
@echo "Compilo eseugibile"
$(CC) $(CFLAGS) $< -o $@.out -L . -linterpolazione $(OPTFLAGS)
clean:
@echo "Cleaning"
-rm -f *.a
-rm -f *.o
-rm -f *.out
-rm -f plot/*.png