From 8b222c9e59a41220ef69d2244544c13ca7f88c60 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Fri, 24 Apr 2026 18:12:37 -0400 Subject: convert build to Makefile, bump version --- Makefile | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f81e596 --- /dev/null +++ b/Makefile @@ -0,0 +1,45 @@ +# spreed - speed reader + +include config.mk + +SRC = spreed.c +OBJ = $(SRC:.c=.o) + +all: options spreed + +options: + @echo spreed build options: + @echo "CFLAGS = $(CFLAGS)" + @echo "LDFLAGS = $(LDFLAGS)" + @echo "CC = $(CC)" + +.c.o: + $(CC) -c $(CFLAGS) $< + +config.h: + cp config.def.h $@ + +$(OBJ): config.h config.mk + +spreed: spreed.o + $(CC) -o $@ spreed.o $(LDFLAGS) + +clean: + rm -f spreed $(OBJ) + +dist: clean + mkdir -p spreed-$(VERSION) + cp LICENSE Makefile config.def.h config.mk $(SRC)\ + spreed-$(VERSION) + tar --zstd -cf spreed-$(VERSION).tar.zst spreed-$(VERSION) + rm -rf spreed-$(VERSION) + +install: spreed + mkdir -p $(DESTDIR)$(PREFIX)/$(BIN) + cp -f spreed $(DESTDIR)$(PREFIX)/$(BIN) + chmod 755 $(DESTDIR)$(PREFIX)/$(BIN)/spreed + +uninstall: + rm -f $(DESTDIR)$(PREFIX)/bin/spreed + +.PHONY: all options clean install uninstall -- cgit v1.2.3