-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
64 lines (48 loc) · 1.68 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#### Start of standard makefile configuration. ####
SHELL := /usr/bin/env bash
LN_S := ln -sf
INSTALL := install
INSTALL_PROGRAM := $(INSTALL)
# Root of the installation
prefix := /usr/local
# Root of the executables
exec_prefix := $(prefix)
# Executables
bindir := $(exec_prefix)/bin
# Set space as the recipe prefix, instead of tab
# Note: It also works with multiple spaces before the recipe text
empty :=
space := $(empty) $(empty)
.RECIPEPREFIX := $(space) $(space)
# Enable delete on error, which is disabled by default for legacy reasons
.DELETE_ON_ERROR:
#### End of standard makefile configuration. ####
# Project specific absolute path
srcdir := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
green := \\e[32m
blue := \\e[34m
bold := \\e[1m
reset := \\e[0m
CFLAGS ?= -O3
# default to /usr/bin/gcc
CC = /usr/bin/gcc
.PHONY: all
all: sway-musli
.PHONY: install
install: installdirs
@echo -e $(blue)Installing ...$(reset)
@$(INSTALL_PROGRAM) sway-musli $(DESTDIR)$(bindir)/sway-musli
@echo -e ' 'Installing $(green)sway-musli$(reset) in $(green)$(DESTDIR)$(bindir)/$(reset)$(bold)sway-musli$(reset)
@echo -e $(blue)Installing$(reset) $(green)DONE$(reset)
.PHONY: installdirs
installdirs:
@echo -e $(blue)Creating directories ...$(reset)
@mkdir -p $(DESTDIR)$(bindir)
@echo -e ' 'Creating directory $(green)$(DESTDIR)$(bindir)$(reset)
@echo -e $(blue)Creating directories$(reset) $(green)DONE$(reset)\\n
.PHONY: uninstall
uninstall:
@echo -e $(blue)Uninstalling ...$(reset)
@rm -f $(DESTDIR)$(bindir)/sway-musli
@echo -e ' 'Deleting file $(green)sway-musli$(reset) in $(green)$(DESTDIR)$(bindir)/$(reset)$(bold)sway-musli$(reset)
@echo -e $(green)Uninstalling DONE$(reset)