forked from vieter-v/libvieter
chore: make lint job check for warnings
parent
d11d074960
commit
0c673a2751
|
@ -11,5 +11,6 @@ pipeline:
|
|||
pull: true
|
||||
commands:
|
||||
- make lint
|
||||
- make CFLAGS='-Werror'
|
||||
when:
|
||||
event: [push, pull_request]
|
||||
|
|
8
Makefile
8
Makefile
|
@ -25,8 +25,8 @@ INC_FLAGS := $(addprefix -I,$(INC_DIRS))
|
|||
# object file is also recompiled if only a header is changed.
|
||||
# -MP: generate a dummy target for every header file (according to the docs it
|
||||
# prevents some errors when removing header files)
|
||||
CFLAGS ?= -MMD -MP -Wall -Wextra
|
||||
CFLAGS += $(INC_FLAGS)
|
||||
CFLAGS ?= -MMD -MP
|
||||
VIETERCFLAGS := $(INC_FLAGS) $(CFLAGS) -Wall -Wextra
|
||||
|
||||
.PHONY: all
|
||||
all: vieter
|
||||
|
@ -40,7 +40,7 @@ $(BUILD_DIR)/$(LIB_FILENAME): $(OBJS)
|
|||
|
||||
$(BUILD_DIR)/$(SRC_DIR)/%.c.o: $(SRC_DIR)/%.c
|
||||
mkdir -p $(dir $@)
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
$(CC) $(VIETERCFLAGS) -c $< -o $@
|
||||
|
||||
|
||||
# =====TESTING=====
|
||||
|
@ -67,7 +67,7 @@ $(BINS_TEST): %: %.c.o $(OBJS)
|
|||
# exposed.
|
||||
$(BUILD_DIR)/$(TEST_DIR)/%.c.o: $(TEST_DIR)/%.c
|
||||
mkdir -p $(dir $@)
|
||||
$(CC) $(CFLAGS) -I$(TEST_DIR) \
|
||||
$(CC) $(VIETERCFLAGS) -I$(TEST_DIR) \
|
||||
-I$(dir $(@:$(BUILD_DIR)/$(TEST_DIR)/%=$(SRC_DIR)/%)) \
|
||||
-c $< -o $@
|
||||
|
||||
|
|
Loading…
Reference in New Issue