From 1adb62bef16c7c6a337566c5f6cf8880e5629dcd Mon Sep 17 00:00:00 2001 From: Diego Diaz <49420637+sodomon2@users.noreply.github.com> Date: Fri, 5 Feb 2021 00:07:55 -0400 Subject: [PATCH] Add Makefile (#13) * Added support for Makefile Added `make` construction support * Fix Typo --- Makefile | 25 +++++++++++++++++++++++++ cchat-gtk.desktop | 7 +++++++ 2 files changed, 32 insertions(+) create mode 100644 Makefile create mode 100644 cchat-gtk.desktop diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f0b49cd --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +BIN ?= cchat-gtk +GO ?= go + +PREFIX ?= /usr/local +BINDIR ?= $(PREFIX)/bin +DATADIR ?= $(PREFIX)/share + +cchat-gtk: + $(GO) build -v -o bin/$(BIN) + @strip bin/$(BIN) + +install: + install -Dm775 bin/$(BIN) $(DESTDIR)$(BINDIR)/$(BIN) + install -Dm775 cchat-gtk.desktop $(DESTDIR)$(DATADIR)/applications/cchat-gtk.desktop + install -Dm775 icons/cchat.png $(DESTDIR)$(DATADIR)/pixmaps/cchat-gtk.png + +uninstall: + rm -rf $(DESTDIR)$(BINDIR)/$(BIN) + rm -rf $(DESTDIR)$(DATADIR)/pixmaps/cchat-gtk.png + rm -rf $(DESTDIR)$(DATADIR)/applications/cchat-gtk.desktop + +clean: + rm -rf bin/ + +.PHONY: cchat-gtk \ No newline at end of file diff --git a/cchat-gtk.desktop b/cchat-gtk.desktop new file mode 100644 index 0000000..eb1f036 --- /dev/null +++ b/cchat-gtk.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=cchat-gtk +Exec=cchat-gtk +Icon=cchat-gtk +Terminal=false +Type=Application +Categories=Network;Gtk;Discord;Mock; \ No newline at end of file