Makefile: add -Wall
This commit is contained in:
parent
48619fe120
commit
2d6547a435
1 changed files with 3 additions and 2 deletions
5
Makefile
5
Makefile
|
@ -2,18 +2,19 @@ PREFIX=/usr
|
||||||
|
|
||||||
.PHONY: main test install uninstall clean
|
.PHONY: main test install uninstall clean
|
||||||
|
|
||||||
|
CFLAGS := -Wall
|
||||||
SRCFILES := $(shell find . -type f -name "*.c")
|
SRCFILES := $(shell find . -type f -name "*.c")
|
||||||
OBJFILES := $(patsubst %.c, %.o, $(SRCFILES))
|
OBJFILES := $(patsubst %.c, %.o, $(SRCFILES))
|
||||||
|
|
||||||
|
|
||||||
iast: main.o $(OBJFILES)
|
iast: main.o $(OBJFILES)
|
||||||
$(CC) $^ -o $@
|
$(CC) $^ -o $@ $(CFLAGS)
|
||||||
|
|
||||||
test: iast
|
test: iast
|
||||||
sh tests/test.sh
|
sh tests/test.sh
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CC) -MMD -MP -c $< -o $@
|
$(CC) -MMD -MP -c $< -o $@ $(CFLAGS)
|
||||||
|
|
||||||
install:
|
install:
|
||||||
install -m 0755 iast $(PREFIX)/bin
|
install -m 0755 iast $(PREFIX)/bin
|
||||||
|
|
Loading…
Add table
Reference in a new issue