Makefile 278 Bytes
Newer Older
Tobias Langer committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
NAME=testproject

CC=clang
CFLAGS=-Wall -Werror -O3
LD=clang
LDFLAGS=-lm
LIBS=
SRC=$(wildcard *.c)
OBJ=$(patsubst %.c,%.o,$(SRC))

.PHONY: all clean

all: $(NAME)

$(NAME): $(OBJ)
	$(LD) -o $@ $(LDFLAGS) $^ $(LIBS)

%.o: %.c
	$(CC) -c $(CFLAGS) $^

clean:
	rm -f $(NAME) $(OBJ)