2023-10-24 15:48:13 +02:00
|
|
|
.PHONY: clean, mrproper
|
|
|
|
CC = gcc
|
|
|
|
CFLAGS = -g -Wall
|
|
|
|
|
2023-12-21 23:36:03 +01:00
|
|
|
SRC = ex1 ex2 ex3 ex4 ex5 ex6 ex7 group
|
|
|
|
|
|
|
|
all: $(SRC)
|
2023-11-17 16:10:39 +01:00
|
|
|
|
|
|
|
group: group.o mergeSort.o
|
|
|
|
$(CC) $(CFLAGS) -o $@ $+
|
2023-10-24 15:48:13 +02:00
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
2023-11-08 09:42:46 +01:00
|
|
|
%: %.o
|
2023-10-24 15:48:13 +02:00
|
|
|
$(CC) $(CFLAGS) -o $@ $+
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o core.*
|
2023-12-21 23:36:03 +01:00
|
|
|
rm -f plot.png
|
|
|
|
rm -f $(SRC)
|
2023-10-24 15:48:13 +02:00
|
|
|
|
2023-11-17 16:10:39 +01:00
|
|
|
run: group
|
2023-10-24 15:48:13 +02:00
|
|
|
./$<
|
2023-11-08 09:42:46 +01:00
|
|
|
|
|
|
|
graph: run
|
|
|
|
graph -Tpng plot > plot.png
|
|
|
|
nsxiv plot.png
|