rvuw/Makefile
2024-04-03 13:20:53 +02:00

29 lines
504 B
Makefile

CC = x86_64-w64-mingw32-gcc
RM = rm
SOURCES = $(wildcard src/*.c)
OBJETS = $(patsubst %.c,%.o,$(notdir $(SOURCES)))
CFLAGS = -std=gnu17 -pedantic
LDFLAGS = -lhid -lsetupapi
EXE = rvuw
EXE_EXT = exe
%.o: src/%.c
$(CC) -c $< -o $@ $(CFLAGS)
compilation: $(OBJETS)
$(CC) -o $(EXE).$(EXE_EXT) $(OBJETS) $(LDFLAGS)
main: CFLAGS += -O3
main: compilation
dev: CFLAGS += -Wall -Wextra -Wshadow -Wcast-align -fanalyzer -g -Og
dev: compilation
all:
main
clean:
$(RM) $(OBJETS) $(EXE).$(EXE_EXT)