2024-12-11 20:30:24 +02:00
|
|
|
CFLAGS=-O3 -Iinc/
|
|
|
|
|
|
|
|
build: main
|
|
|
|
|
2024-12-11 22:38:52 +02:00
|
|
|
test: tester
|
|
|
|
|
2024-12-12 19:59:08 +02:00
|
|
|
tester: out/tester.o out/sorter.o
|
|
|
|
gcc $(CFLAGS) out/tester.o out/sorter.o -o tester
|
2024-12-11 22:38:52 +02:00
|
|
|
|
|
|
|
out/tester.o: out/ src/tester.c
|
|
|
|
gcc $(CFLAGS) -c src/tester.c -o out/tester.o
|
|
|
|
|
2024-12-12 19:59:08 +02:00
|
|
|
out/sorter.o: out/ src/sorter.c
|
|
|
|
gcc $(CFLAGS) -c src/sorter.c -o out/sorter.o
|
|
|
|
|
2024-12-11 20:30:24 +02:00
|
|
|
out/:
|
|
|
|
mkdir out/
|
|
|
|
|
|
|
|
main: out/main.o out/swapper.o
|
|
|
|
gcc $(CFLAGS) out/main.o out/swapper.o -o main
|
|
|
|
|
|
|
|
out/main.o: out/ src/main.c
|
|
|
|
gcc $(CFLAGS) -c src/main.c -o out/main.o
|
|
|
|
|
|
|
|
out/swapper.o: out/ src/swapper.c
|
|
|
|
gcc $(CFLAGS) -c src/swapper.c -o out/swapper.o
|
|
|
|
|
|
|
|
clean:
|
2024-12-11 22:38:52 +02:00
|
|
|
rm -r main tester out/
|
2024-12-11 20:30:24 +02:00
|
|
|
|
2024-12-11 22:38:52 +02:00
|
|
|
.PHONY: build test clean
|