diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 45 |
1 files changed, 45 insertions, 0 deletions
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 |
