ofetch: A fetch script written for the oil shell
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

34 lines
673 B

TARGET=ofetch
SRC=ofetch.oil
PREFIX ?= ~/.local/bin
VERSION=0.1
.PHONY: all release install uninstall clean
all: $(TARGET)
release: $(TARGET)-release
debug: $(TARGET)-debug
$(TARGET): $(SRC)
cp $(SRC) $(TARGET)
chmod +x $(TARGET)
$(TARGET)-release: $(SRC)
$(CC) $(CFLAGS) $(CPPFLAGSREL) $(LDFLAGS) $(SRC) -o $(TARGET)
tar -czvf $(TARGET)-$(VERSION).tar.gz $(TARGET)
install: $(TARGET)
mkdir -p $(DESTDIR)$(PREFIX)/
install -m755 $(TARGET) $(DESTDIR)$(PREFIX)/$(TARGET)
uninstall:
$(RM) $(DESTDIR)$(PREFIX)/$(TARGET)
$(TARGET)-debug: $(SRC)
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(SRC) -Og -o $@
clean:
$(RM) $(TARGET)
$(RM) $(TARGET)-$(VERSION).tar.gz