Update Makefile. Use ./build dir

This commit is contained in:
gandc 2025-03-13 19:26:02 +03:00
parent 9fa617005a
commit e86c90e739
Signed by: gandc
GPG Key ID: 9F77B03D43C42CB4

View File

@ -6,17 +6,20 @@ CFLAGS = -Wall
all: task1 task2 task3 task4 all: task1 task2 task3 task4
task1: build:
$(CC) $(CFLAGS) task1/main.c -o task1/task1 mkdir -p build
task1: build
$(CC) $(CFLAGS) task1/main.c -o build/task1
task2: task2: build
$(CC) $(CFLAGS) task2/main.c -o task2/task2 $(CC) $(CFLAGS) task2/main.c -o build/task2
task3: task3: build
$(CC) $(CFLAGS) task3/main.c -o task3/task3 $(CC) $(CFLAGS) task3/main.c -o build/task3
task4: task4: build
$(CC) $(CFLAGS) task4/main.c -lm -o task4/task4 $(CC) $(CFLAGS) task4/main.c -lm -o build/task4
clean: clean:
rm -f task1/task1 task2/task2 task3/task3 task4/task4 rm -f build/task1 build/task2 build/task3 build/task4