From c6ad098a80adc3250d3f08d0c2b884135d98b0a7 Mon Sep 17 00:00:00 2001 From: justanothercatgirl Date: Wed, 25 Sep 2024 14:44:31 +0300 Subject: initial commit --- Makefile | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) (limited to 'Makefile') 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 + -- cgit v1.2.3-70-g09d2