diff options
author | jvech <jmvalenciae@unal.edu.co> | 2023-06-18 15:03:25 -0500 |
---|---|---|
committer | jvech <jmvalenciae@unal.edu.co> | 2023-06-18 15:03:25 -0500 |
commit | 3113ade53d0dd889058c7838bb19c0fa0492b410 (patch) | |
tree | 4ca9353b421fbdc9d8ead8a257c415be133315d7 /Makefile |
init: ppm library utilities implemented
It is not completed at all but it works well
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 30 |
1 files changed, 30 insertions, 0 deletions
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 |