aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile32
1 files changed, 30 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 79b383d..aca0f03 100644
--- a/Makefile
+++ b/Makefile
@@ -1,2 +1,30 @@
-sin: main.c
- cc -o sin main.c
+
+all: t1_a t1_b t2 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 $@
+
+t2: main_2.c
+ $(CC) $(T2FLAGS) $^ -o $@ $(T2LINKS)
+
+test.so: test_f.c
+ $(CC) -fPIC -fPIE -shared $^ -o $@
+
+.PHONY: clean
+
+clean:
+ rm -rf t1_a t1_b t2 test.so
+