lis3dh/Makefile

29 lines
938 B
Makefile
Raw Permalink Normal View History

2023-12-21 18:17:20 +00:00
CC=gcc
2024-08-19 00:27:16 +00:00
CFLAGS = -g -O0 -Wall -Wextra -Wpedantic -Wshadow -Wformat=2 -Wfloat-equal \
-Wconversion -Wcast-align -Wpointer-arith -Wstrict-overflow=5 \
-Wwrite-strings -Wcast-qual -Wswitch-default -Wswitch-enum \
-Wunreachable-code -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wredundant-decls -Wold-style-definition \
-Winline -Wlogical-op -Wjump-misses-init -Wdouble-promotion \
-Wformat-overflow=2 -Wformat-signedness -Wmissing-include-dirs \
-Wnull-dereference -Wstack-usage=1024 -Wpacked -Woverlength-strings \
-Wvla -Walloc-zero -Wduplicated-cond -Wduplicated-branches -Wrestrict \
-fanalyzer \
-I. -std=c89
2024-01-03 16:02:42 +00:00
2024-08-19 00:27:16 +00:00
CFILES = $(wildcard *.c)
OBJECTS = $(CFILES:.c=.o)
BIN = lis3dh
2024-04-25 21:34:17 +00:00
2024-08-19 00:27:16 +00:00
all: $(BIN)
$(BIN): $(OBJECTS)
@echo ">>> $@"
@$(CC) $(CFLAGS) $^ -o $@
2024-04-25 21:34:17 +00:00
%.o:%.c
2024-08-19 00:27:16 +00:00
@echo "cc $<"
@$(CC) $(CFLAGS) -c $< -o $@
2023-12-21 20:52:17 +00:00
clean:
2024-08-19 00:27:16 +00:00
@rm -rf $(OBJECTS)