Commit 42d8d51d by Tobias Langer

Added Makefile.

parent 48b29bd4
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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment