From 9195ff97b7f1b61ad06852c482a6570c322444bc Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 11 Mar 2026 23:24:52 +0000 Subject: util/spkmodem-recv: fix getopt prototype i use -pedantic and std=c90 also add the define Signed-off-by: Leah Rowe --- util/spkmodem_recv/Makefile | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'util/spkmodem_recv/Makefile') diff --git a/util/spkmodem_recv/Makefile b/util/spkmodem_recv/Makefile index 3c5dc51f..95683df2 100644 --- a/util/spkmodem_recv/Makefile +++ b/util/spkmodem_recv/Makefile @@ -1,14 +1,30 @@ -# SPDX-License-Identifier: GPL-2.0-or-later +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: 2022,2026 Leah Rowe +# SPDX-FileCopyrightText: 2023 Riku Viitanen + 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 -- cgit v1.2.1