Fix checkout bug
This commit is contained in:
13
Makefile
13
Makefile
@@ -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
|
||||
Reference in New Issue
Block a user