From 3113ade53d0dd889058c7838bb19c0fa0492b410 Mon Sep 17 00:00:00 2001 From: jvech Date: Sun, 18 Jun 2023 15:03:25 -0500 Subject: init: ppm library utilities implemented It is not completed at all but it works well --- Makefile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4403292 --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +CC = clang +CFLAGS = -std=c11 -Wall -g +BIN = dsco +OBJDIR = objs +SRC = $(wildcard src/*.c) +HEADERS = $(wildcard src/*.h) +OBJS = $(SRC:src/%.c=${OBJDIR}/%.o) +.PHONY: clean all run + +all: build + +$(OBJS): | $(OBJDIR) + +$(OBJDIR): + mkdir ${OBJDIR} + +$(OBJDIR)/%.o: src/%.c $(HEADERS) + ${CC} -c -o $@ $< ${CFLAGS} + +build: $(OBJS) + ${CC} ${DLIBS} -o ${BIN} ${OBJS} + +run: build + ./${BIN} + +debug: $(BIN) + lldb $< --tui + +clean: + @rm $(OBJS) $(OBJDIR) -rv -- cgit v1.2.3-70-g09d2