Makefile: silence some errors, clean up log
This commit is contained in:
parent
a5c2c35bf6
commit
50d6bbed7b
1 changed files with 11 additions and 3 deletions
14
Makefile
14
Makefile
|
|
@ -1,15 +1,22 @@
|
||||||
CC := gcc
|
CC := gcc
|
||||||
CFLAGS := -Wall -Wextra -O2
|
CFLAGS := -Wall -Wextra -O2
|
||||||
|
|
||||||
|
# Silence some errors/warnings for now
|
||||||
|
CFLAGS += -Wno-implicit-fallthrough
|
||||||
|
CFLAGS += -Wno-strict-aliasing
|
||||||
|
CFLAGS += -Wno-uninitialized
|
||||||
|
|
||||||
SRC := $(wildcard *.c)
|
SRC := $(wildcard *.c)
|
||||||
OBJ := $(SRC:.c=.o)
|
OBJ := $(SRC:.c=.o)
|
||||||
ELF := $(SRC:.c=.elf)
|
ELF := $(SRC:.c=.elf)
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CC) $(CFLAGS) -c -o $@ $<
|
@echo CC $@
|
||||||
|
@$(CC) $(CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
%.elf: %.o
|
%.elf: %.o
|
||||||
$(CC) $(LIBS) -o $@ $<
|
@echo LD $@
|
||||||
|
@$(CC) $(LIBS) -o $@ $<
|
||||||
|
|
||||||
all: $(ELF)
|
all: $(ELF)
|
||||||
|
|
||||||
|
|
@ -23,6 +30,7 @@ format:
|
||||||
clang-format -i $(shell git ls-files '*.c' '*.h')
|
clang-format -i $(shell git ls-files '*.c' '*.h')
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(OBJ) $(ELF) *.json .cache
|
@echo "Cleaning up..."
|
||||||
|
@rm -rf $(OBJ) $(ELF) *.json .cache
|
||||||
|
|
||||||
.PHONY: format
|
.PHONY: format
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue