fix makefile

This commit is contained in:
Mylloon 2024-04-03 15:36:15 +02:00
parent f3615c5adf
commit 937a3ba51c
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

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