|
Revision 2099, 0.7 kB
(checked in by n0-1, 5 years ago)
|
remove -pedantic and readd -Werror, as there
seems to be no way of using a variadic macro with
only the minum needed params. gcc warns despite '##'
was used, wich makes no sense to me.
|
| Line | |
|---|
| 1 |
TARGET= nfotizer |
|---|
| 2 |
OBJECTS= $(patsubst %.c,%.o,$(wildcard *.c)) |
|---|
| 3 |
HEADERS= $(wildcard *.h) |
|---|
| 4 |
CFLAGS+= -Wall -Wextra -Wunused -Wdeclaration-after-statement -Wundef \ |
|---|
| 5 |
-Wendif-labels -Wshadow -Wpointer-arith -Wbad-function-cast \ |
|---|
| 6 |
-Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes \ |
|---|
| 7 |
-Wold-style-definition -Wmissing-prototypes -Winline \ |
|---|
| 8 |
-Wmissing-declarations -Wmissing-noreturn -std=gnu99 \ |
|---|
| 9 |
-Wmissing-format-attribute -Wredundant-decls -Werror |
|---|
| 10 |
CC?= gcc |
|---|
| 11 |
|
|---|
| 12 |
ifneq (${DEBUG},) |
|---|
| 13 |
CFLAGS+= -g |
|---|
| 14 |
else |
|---|
| 15 |
CFLAGS+= -Os |
|---|
| 16 |
endif |
|---|
| 17 |
|
|---|
| 18 |
ifneq (${VERBOSE},) |
|---|
| 19 |
CFLAGS+= -DDEBUG |
|---|
| 20 |
endif |
|---|
| 21 |
|
|---|
| 22 |
all: ${TARGET} |
|---|
| 23 |
|
|---|
| 24 |
debug: |
|---|
| 25 |
make DEBUG=1 |
|---|
| 26 |
|
|---|
| 27 |
clean: |
|---|
| 28 |
-rm -f ${OBJECTS} |
|---|
| 29 |
|
|---|
| 30 |
distclean: clean |
|---|
| 31 |
-rm -f ${TARGET} ${TESTS} |
|---|
| 32 |
|
|---|
| 33 |
${TARGET}: ${OBJECTS} |
|---|
| 34 |
${CC} ${LDFLAGS} -o $@ $^ |
|---|
| 35 |
|
|---|
| 36 |
.PHONY: all debug clean distclean |
|---|