Fix checkout bug

This commit is contained in:
womax
2024-06-05 19:30:57 +02:00
parent 0fb0039b7d
commit ff2d6f49aa
7 changed files with 44 additions and 28 deletions

View File

@@ -1,4 +1,6 @@
SRC := $(wildcard src/*.c)
OBJ := $(addsuffix .o, $(basename $(SRC)))
OBJ_DEST := $(addprefix build/, $(OBJ))
CFLAGS := -lcrypto -lm -lz
DEBUG ?= false
@@ -6,8 +8,15 @@ ifeq ($(DEBUG), true)
DEBUG_FLAG = -DDEBUG -ggdb
endif
all: $(SRC)
gcc -o build/cgit $(SRC) $(CFLAGS) $(DEBUG_FLAG)
all: $(OBJ_DEST)
gcc -o build/cgit $(OBJ_DEST) $(CFLAGS) $(DEBUG_FLAG)
build/%.o: %.c
@mkdir -p $(dir $@)
gcc -c $< -o $@ $(CFLAGS) $(DEBUG_FLAG)
clean:
@rm -rf build/*
run: all
build/cgit