15 lines
245 B
Makefile
15 lines
245 B
Makefile
|
RM = /bin/rm -f
|
||
|
CC = gcc
|
||
|
CFLAGS = -Wall
|
||
|
DEPS = primes.h
|
||
|
OBJ = go.o primes.o
|
||
|
#%.o recipe with dependencies
|
||
|
%.o: %.c $(DEPS)
|
||
|
$(CC) $(CFLAGS) -c -o $@ $<
|
||
|
#go recipe with dependencies
|
||
|
go: $(OBJ)
|
||
|
gcc $(CFLAGS) -o $@ $^
|
||
|
#
|
||
|
clean:
|
||
|
$(RM) $(OBJ) go *~
|