From ef28fcb0f59d11bdf9f574a999045bc24ca40e18 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Sun, 25 Dec 2016 10:14:11 +0100 Subject: Initial --- Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1583287 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +CC = gcc +CFLAGS = -Wall -Wextra -std=c11 -fwrapv +ifneq ($(DEBUG),) + CFLAGS += -g +else + CFLAGS += -O2 +endif +BIN = cserver + +.PHONY: all clean remake + +all: $(BIN) + +clean: + rm -rf $(BIN) *.o *.dSYM + +remake: clean all + + +$(BIN): $(patsubst %.c,%.o,$(wildcard *.c)) + $(CC) -o $@ $^ + +%.o: %.cpp $(wildcard *.h) + $(CC) $(CFLAGS) -c -o $@ $< -- cgit v1.2.3-70-g09d2