-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
99 lines (61 loc) · 2.35 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
SHELL = /bin/bash
.PHONY: all ham firefox chrome noaa xrandr-setup xsl
.DEFAULT: all
prefix ?=
exec_prefix = $(prefix)
bindir = $(exec_prefix)bin/
sbindir = $(exec_prefix)sbin/
datadir = $(exec_prefix)share/
SRCDIR ?= $(abspath $(dir $(lastword $(MAKEFILE_LIST))))/
DESTDIR ?= $(HOME)/.local/
BINDIR = $(DESTDIR)$(bindir)
SBINDIR = $(DESTDIR)$(sbindir)
SYSCONFDIR = $(HOME)/.config/
DATADIR = $(DESTDIR)$(datadir)
DARKICETARGETS ?= $(BINDIR)darkice-media $(BINDIR)darkice-ft857d $(BINDIR)darkice-rtlsdr $(BINDIR)darkice-hackrf
DIRS = $(DESTDIR) $(BINDIR) $(SBINDIR) $(SYSCONFDIR) $(DATADIR) $(DATADIR)noaa $(DATADIR)xsl
all: firefox ham
acpi: $(BINDIR)acpi-listener
ham: $(BINDIR)grig-ft857d
firefox: $(BINDIR)firefox-anon $(BINDIR)firefox-nono $(BINDIR)firefox-work $(BINDIR)firefox-personal
chrome: $(BINDIR)chrome-anon $(BINDIR)chrome-nono $(BINDIR)chrome-work $(BINDIR)chrome-personal
noaa: $(BINDIR)conky-noaa.py $(BINDIR)noaa.py $(DATADIR)noaa/stations-with-zips.csv
xsl: $(BINDIR)prettyxml $(DATADIR)xsl/prettyxml.xsl
prettyprinters: prettyxml prettyjson
prettyxml: $(BINDIR)prettyxml
prettyjson: $(BINDIR)prettyjson
firefox-%: $(BINDIR)firefox-%
chrome-%: $(BINDIR)chrome-%
$(BINDIR)chrome-anon:
ln -sf $(SRCDIR)chrome-anon $(BINDIR)chrome-anon
$(BINDIR)chrome-anon-proxy:
ln -sf $(SRCDIR)chrome-anon-proxy $(BINDIR)chrome-anon-proxy
$(BINDIR)firefox-anon:
ln -sf $(SRCDIR)firefox-anon $(BINDIR)firefox-anon
$(BINDIR)firefox-nono:
ln -sf $(SRCDIR)firefox-nono $(BINDIR)firefox-nono
$(BINDIR)firefox-%:
ln -sf $(SRCDIR)firefox-$* $(BINDIR)firefox-$*
$(BINDIR)chrome-%:
ln -sf $(SRCDIR)chrome-$* $(BINDIR)chrome-$*
$(BINDIR)darkice-source:
ln -sf $(SRCDIR)darkice-source $@
$(BINDIR)darkice-%: $(BINDIR)darkice-source
ln -sf $(BINDIR)darkice-source $@
$(BINDIR)prettyxml: $(DATADIR)xsl/prettyxml.xsl
$(DATADIR)xsl/prettyxml.xsl: $(DATADIR)xsl
$(BINDIR)conky-noaa.py $(BINDIR)noaa.py: $(DATADIR)noaa/stations-with-zips.csv
$(DATADIR)noaa/stations-with-zips.csv: $(SRCDIR)noaa/stations-with-zipcodes.csv $(DATADIR)noaa
$(BINDIR)acpi-listener: $(BINDIR)tosocket
$(SRCDIR)noaa/stations-with-zipcodes.csv:
python2 $(SRCDIR)noaa_stations_with_zips.py noaa/noaa_stations.csv noaa/zips.csv $@
$(BINDIR)%:
ln -sf $(SRCDIR)$* $@
$(SBINDIR)%:
ln -sf $(SRCDIR)$* $@
$(SYSCONFDIR)%:
ln -sf $(SRCDIR)$* $@
$(DATADIR)%:
ln -sf $(SRCDIR)$* $@
$(DIRS):
mkdir -p $@