rvuw/Makefile

30 lines
520 B
Makefile
Raw Normal View History

2024-04-03 12:59:24 +02:00
CC = x86_64-w64-mingw32-gcc
RM = rm
SOURCES = $(wildcard src/*.c)
2024-04-03 15:36:15 +02:00
OBJECTS = $(patsubst %.c,%.o,$(notdir $(SOURCES)))
2024-04-03 12:59:24 +02:00
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)
2024-04-03 15:36:15 +02:00
release: CFLAGS += -O3
release: compilation
2024-04-03 12:59:24 +02:00
2024-04-03 15:36:15 +02:00
debug: CFLAGS += -Wall -Wextra -Wshadow -Wcast-align -fanalyzer -g -Og
debug: compilation
2024-04-03 12:59:24 +02:00
2024-04-03 15:36:15 +02:00
compilation: $(OBJECTS)
$(CC) -o $(EXE).$(EXE_EXT) $(OBJECTS) $(LDFLAGS)
2024-04-03 12:59:24 +02:00
all:
2024-04-03 15:36:15 +02:00
release
2024-04-03 12:59:24 +02:00
clean:
2024-04-03 15:36:15 +02:00
$(RM) $(OBJECTS) $(EXE).$(EXE_EXT)