Add Makefile (#13)

* Added support for Makefile

Added `make` construction support

* Fix Typo
This commit is contained in:
Diego Diaz 2021-02-05 00:07:55 -04:00 committed by GitHub
parent 70517ecb88
commit 1adb62bef1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 0 deletions

25
Makefile Normal file
View File

@ -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

7
cchat-gtk.desktop Normal file
View File

@ -0,0 +1,7 @@
[Desktop Entry]
Name=cchat-gtk
Exec=cchat-gtk
Icon=cchat-gtk
Terminal=false
Type=Application
Categories=Network;Gtk;Discord;Mock;