basic makefile and gitignore
This commit is contained in:
parent
9c8472ec30
commit
906afb2600
2 changed files with 32 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*.o
|
||||||
|
*.exe
|
30
Makefile
Normal file
30
Makefile
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
CC = x86_64-w64-mingw32-gcc
|
||||||
|
RM = rm
|
||||||
|
|
||||||
|
SOURCES = $(wildcard src/*.c)
|
||||||
|
OBJETS = $(patsubst %.c,%.o,$(notdir $(SOURCES)))
|
||||||
|
|
||||||
|
CFLAGS = -std=gnu17 -pedantic
|
||||||
|
LDFLAGS =
|
||||||
|
|
||||||
|
EXE = rvuw
|
||||||
|
EXE_EXT = exe
|
||||||
|
|
||||||
|
%.o: src/%.c
|
||||||
|
$(CC) -c $< -o $@ $(CFLAGS)
|
||||||
|
|
||||||
|
compilation: $(OBJETS)
|
||||||
|
$(CC) -o $(EXE).$(EXE_EXT) $(OBJETS) $(LDFLAGS)
|
||||||
|
|
||||||
|
main: CFLAGS += -O3
|
||||||
|
main: compilation
|
||||||
|
|
||||||
|
dev: CFLAGS += -Wall -Wextra -Wshadow -Wcast-align -Wstrict-prototypes
|
||||||
|
dev: CFLAGS += -fanalyzer -g -Og
|
||||||
|
dev: compilation
|
||||||
|
|
||||||
|
all:
|
||||||
|
main
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(RM) $(OBJETS) $(EXE).$(EXE_EXT)
|
Loading…
Reference in a new issue