util/spkmodem-recv: fix getopt prototype

i use -pedantic and std=c90

also add the define

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-11 23:24:52 +00:00
parent 62c0cc68c5
commit 9195ff97b7
2 changed files with 30 additions and 8 deletions
+24 -8
View File
@@ -1,14 +1,30 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2022,2026 Leah Rowe <leah@libreboot.org>
# SPDX-FileCopyrightText: 2023 Riku Viitanen <riku.viitanen@protonmail.com>
CC?=cc
CFLAGS?=-Os -Wall -Wextra -Werror -pedantic
CFLAGS?=-Os -Wall -Wextra -Werror -pedantic -std=c90
DESTDIR?=
PREFIX?=/usr/local
INSTALL?=install
spkmodem-recv:
$(CC) $(CFLAGS) -o $@ $@.c
install: spkmodem-recv
$(INSTALL) -d $(DESTDIR)$(PREFIX)/bin/
$(INSTALL) $< -t $(DESTDIR)$(PREFIX)/bin/
PROG=spkmodem-recv
all: $(PROG)
$(PROG): spkmodem-recv.c
$(CC) $(CFLAGS) spkmodem-recv.c -o $(PROG)
install: $(PROG)
mkdir -p $(DESTDIR)$(PREFIX)/bin/
install $(PROG) $(DESTDIR)$(PREFIX)/bin/
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROG)
clean:
rm -f spkmodem-recv
rm -f $(PROG)
distclean: clean
.PHONY: all install uninstall clean distclean