2024-04-03 12:59:24 +02:00
|
|
|
CC = x86_64-w64-mingw32-gcc
|
|
|
|
RM = rm
|
|
|
|
|
|
|
|
SOURCES = $(wildcard src/*.c)
|
|
|
|
OBJETS = $(patsubst %.c,%.o,$(notdir $(SOURCES)))
|
|
|
|
|
|
|
|
CFLAGS = -std=gnu17 -pedantic
|
2024-04-03 13:20:53 +02:00
|
|
|
LDFLAGS = -lhid -lsetupapi
|
2024-04-03 12:59:24 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2024-04-03 13:20:53 +02:00
|
|
|
dev: CFLAGS += -Wall -Wextra -Wshadow -Wcast-align -fanalyzer -g -Og
|
2024-04-03 12:59:24 +02:00
|
|
|
dev: compilation
|
|
|
|
|
|
|
|
all:
|
|
|
|
main
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) $(OBJETS) $(EXE).$(EXE_EXT)
|