-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (39 loc) · 1.21 KB
/
Makefile
File metadata and controls
46 lines (39 loc) · 1.21 KB
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
BINDIR ?= /usr/bin
MANDIR ?= /usr/share/man/man1
LICENSEDIR ?= /usr/share/licenses/pasfetch
# ============================================================================ #
# Additional build- & featureflags.
#
# In order for these to take proper effect, you may have to run `make clean`
# first.
#
# Specify the flags in the format of `-d<FLAGNAME>[=<OPTIONAL VALUE>]`
#
# NO_CPU_NAME_NORMALIZE
# Disable the normalization of multiple spaces into singular spaces
# for CPU model names.
#
# NO_DEFAULT_INFORMATION
# Do not use a list of default informations when no information is specified
# via the command line or via a configuration file.
FPC_FLAGS = -FE"obj/"
.PHONY: debug
debug:
@mkdir -p obj
fpc src/pasfetch.pas $(FPC_FLAGS) -gl
doc/pasfetch.1: doc/pasfetch.adoc
asciidoctor -b manpage $^
.PHONY: release
release: clean doc/pasfetch.1
@mkdir -p obj
fpc src/pasfetch.pas $(FPC_FLAGS) -O4 -XX -Xs
.PHONY: clean
clean:
find -iname '*.o' -type f -exec rm {} ';'
find -iname '*.ppu' -type f -exec rm {} ';'
rm -f obj/pasfetch
.PHONY: install
install: release
install -m 0755 ./obj/pasfetch $(BINDIR)
install -m 0644 ./doc/pasfetch.1 $(MANDIR)
install -Dm 0644 LICENSE $(LICENSEDIR)/LICENSE