From aa0d37540f5bc4bb6327b43c7213b46d0e261cf0 Mon Sep 17 00:00:00 2001 From: justanothercatgirl Date: Fri, 4 Oct 2024 17:37:14 +0300 Subject: Пока не закончил логику выбора программы, но готовы все алгоритмы MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 37 ++++++++++++++----------------------- 1 file changed, 14 insertions(+), 23 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 508c7de..b3e5061 100644 --- a/Makefile +++ b/Makefile @@ -1,33 +1,24 @@ -all: t1_a t1_b t23 test.so +CFLAGS = -O2 -Wall -Wextra -Werror -Iinclude -T2FLAGS := -Wall +all: task4 -ifneq ($(OS),Windows_NT) - T2FLAGS += -DDYNAMIC_LOAD - T2LINKS = -lm -ldl - ifneq (, $(shell which gnuplot)) - T2FLAGS += -DPIPE_GNUPLOT - ifeq (, ${DISPLAY}) - T2FLAGS += -DTERMINAL_PLOT - endif - endif -endif +build: + mkdir -p build -t1_a: main_1.c - $(CC) -DPROG_SINUS_SUM $^ -o $@ +build/roots.o: src/roots.c build + $(CC) $(CFLAGS) -c -o $@ $< -t1_b: main_1.c - $(CC) -DPROG_MONTE_CARLO $^ -o $@ +build/integral.o: src/integral.c build + $(CC) $(CFLAGS) -c -o $@ $< -t23: main_23.c - $(CC) $(T2FLAGS) $^ -o $@ $(T2LINKS) +task4: build/roots.o build/integral.o src/main.c + $(CC) $(CFLAGS) -o $@ $^ -lm -ldl -test.so: test_f.c - $(CC) -fPIC -fPIE -shared $^ -o $@ +.PHONY: run clean -.PHONY: clean +run: task4 + ./task4 clean: - rm -rf t1_a t1_b t23 test.so - + rm -f build/*.o task4 -- cgit v1.2.3-70-g09d2