aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 0894ce2f51e84264888b4a1448d4a2d68c0cc57b (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
25
26
27
28
29
30
all: t1_a t1_b t23 test.so

T2FLAGS := -Wall

ifneq ($(OS),Windows_NT)
	T2FLAGS += -DDYNAMIC_LOAD
	T2LINKS = -lm -ldl
	ifneq (, $(shell which gnuplot))
		T2FLAGS += -DPIPE_GNUPLOT
	endif
endif

t1_a: main_1.c
	$(CC) -DPROG_SINUS_SUM $^ -o $@

t1_b: main_1.c
	$(CC) -DPROG_MONTE_CARLO $^ -o $@

t23: main_23.c
	$(CC) $(T2FLAGS) $^ -o $@ $(T2LINKS)

test.so: test_f.c
	$(CC) -fPIC -fPIE -shared $^ -o $@ 

.PHONY: clean

clean:
	rm -rf t1_a t1_b t23 test.so