29 lines
364 B
Makefile
29 lines
364 B
Makefile
.PHONY: clean, mrproper
|
|
CC = gcc
|
|
CFLAGS = -g -Wall
|
|
|
|
SRC = ex1 ex2 ex3 ex4 ex5 ex6 ex7 group
|
|
|
|
all: $(SRC)
|
|
|
|
group: group.o mergeSort.o
|
|
$(CC) $(CFLAGS) -o $@ $+
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
%: %.o
|
|
$(CC) $(CFLAGS) -o $@ $+
|
|
|
|
clean:
|
|
rm -f *.o core.*
|
|
rm -f plot.png
|
|
rm -f $(SRC)
|
|
|
|
run: group
|
|
./$<
|
|
|
|
graph: run
|
|
graph -Tpng plot > plot.png
|
|
nsxiv plot.png
|