diff options
author | justanothercatgirl <sotov2070@gmail.com> | 2024-10-04 17:37:14 +0300 |
---|---|---|
committer | justanothercatgirl <sotov2070@gmail.com> | 2024-10-04 18:07:56 +0300 |
commit | aa0d37540f5bc4bb6327b43c7213b46d0e261cf0 (patch) | |
tree | fa9d43d364f3a6d72d7a84c911aabc43658a2998 /Makefile | |
parent | a9bd52226fbcac98bddec9cffcef1ded8b75b5df (diff) |
Пока не закончил логику выбора программы, но готовы все алгоритмы
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 37 |
1 files changed, 14 insertions, 23 deletions
@@ -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 |