2023-10-18 20:27:40 +02:00
|
|
|
.PHONY: clean, mrproper
|
|
|
|
CC = gcc
|
|
|
|
CFLAGS = -g -Wall
|
|
|
|
|
2023-10-24 12:19:02 +02:00
|
|
|
all: ex3 ex4 ex5 group
|
2023-10-18 20:27:40 +02:00
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
ex3: ex3.o
|
|
|
|
$(CC) $(CFLAGS) -o $@ $+
|
|
|
|
|
|
|
|
ex4: ex4.o
|
|
|
|
$(CC) $(CFLAGS) -o $@ $+
|
|
|
|
|
|
|
|
ex5: ex5.o
|
|
|
|
$(CC) $(CFLAGS) -o $@ $+
|
|
|
|
|
2023-10-24 12:19:02 +02:00
|
|
|
group: group.o
|
|
|
|
$(CC) $(CFLAGS) -o $@ $+
|
|
|
|
|
2023-10-18 20:27:40 +02:00
|
|
|
clean:
|
|
|
|
rm -f *.o core.*
|
|
|
|
|
|
|
|
mrproper: clean
|
2023-10-24 12:19:02 +02:00
|
|
|
rm -f ex3 ex4 ex5 group
|
2023-10-18 20:27:40 +02:00
|
|
|
|
2023-10-24 12:19:02 +02:00
|
|
|
run: group
|
|
|
|
./group
|