# GNU Makefile for cfluviurrh.
# SPDX-FileCopyrightText: Chris Pressey, the original author of this work, has dedicated it to the public domain.
# For more information, please refer to <https://unlicense.org/>
# SPDX-License-Identifier: Unlicense
PROG=cfluviurrh
CC?=gcc
WARNS= -W -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
-Wpointer-arith -Wno-uninitialized -Wreturn-type -Wcast-qual \
-Wwrite-strings -Wswitch -Wcast-align -Wchar-subscripts \
-Wshadow -Winline -Wnested-externs -Wredundant-decls
ifdef ANSI
CFLAGS+= -ansi -pedantic
else
CFLAGS+= -std=c99 -D_POSIX_C_SOURCE=200112L
endif
CFLAGS+= ${WARNS} ${EXTRA_CFLAGS}
ifdef DEBUG
CFLAGS+= -g
endif
all: $(PROG)
$(PROG): $(PROG).c
$(CC) $(CFLAGS) $(PROG).c -o $(PROG)
clean:
rm -f *.o *.core *.exe $(PROG)