Makefile precommit

main
Christina 12 months ago
parent 07de5b0fc9
commit 614adbed38
Signed by: cafkafk
GPG Key ID: 8ED4DEF7375A30C8
  1. 34
      Makefile
  2. 0
      ofetch.oil

@ -0,0 +1,34 @@
TARGET=xin
SRC=xin.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)/bin
install -m755 $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(TARGET)
uninstall:
$(RM) $(DESTDIR)$(PREFIX)/bin/$(TARGET)
$(TARGET)-debug: $(SRC)
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(SRC) -Og -o $@
clean:
$(RM) $(TARGET)
$(RM) $(TARGET)-$(VERSION).tar.gz
Loading…
Cancel
Save