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
|
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)
|
||||||
|
|
Loading…
Reference in a new issue