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