fix makefile
This commit is contained in:
parent
f3615c5adf
commit
937a3ba51c
1 changed files with 9 additions and 9 deletions
18
Makefile
18
Makefile
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue