28 lines
336 B
Makefile
28 lines
336 B
Makefile
|
.PHONY: clean, mrproper, run
|
||
|
CC = gcc
|
||
|
CFLAGS = -g -Wall
|
||
|
|
||
|
exos = ex4 group
|
||
|
|
||
|
all: $(exos)
|
||
|
|
||
|
%.o: %.c
|
||
|
$(CC) $(CFLAGS) -c -o $@ $<
|
||
|
|
||
|
ex1: ex1.o RingBuffer.o
|
||
|
$(CC) $(CFLAGS) -o $@ $+
|
||
|
|
||
|
ex%: ex%.o
|
||
|
$(CC) $(CFLAGS) -o $@ $+
|
||
|
|
||
|
group: group.o
|
||
|
$(CC) $(CFLAGS) -o $@ $+
|
||
|
|
||
|
clean:
|
||
|
rm -f *.o core.*
|
||
|
rm -f out group
|
||
|
rm -f ${exos}
|
||
|
|
||
|
run: group
|
||
|
./$<
|