-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
38 lines (29 loc) · 1.01 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
EXE = podbit
UISRC = ui/ui.go ui/input.go colors/colors.go ui/library.go ui/player.go ui/queue.go ui/download.go ui/tray.go
UICOMPS = ui/components/menu.go ui/components/table.go ui/components/list.go
SOUNDSRC = sound/sound.go sound/queue.go
DATASRC = data/data.go data/queue.go data/db.go data/cache.go data/download.go
EVNTSRC = event/event.go event/handle.go
SRC = main.go ver.go ${INPUTSRC} ${UISRC} ${DATASRC} ${EVNTSRC} ${UICOMPS} ${SOUNDSRC}
ifndef PREFIX
PREFIX = /usr/local
endif
ifndef MANPREFIX
MANPREFIX = /usr/local/share/man
endif
${EXE}: ${SRC}
CGO_LDFLAGS_ALLOW=".*" go build
check:
CGO_LDFLAGS_ALLOW=".*" go run -race . 2>race.log
clean:
go clean
install: ${EXE}
mkdir -p ${DESTDIR}${PREFIX}/bin
mkdir -p ${DESTDIR}${MANPREFIX}/man1
cp -f ${EXE} ${DESTDIR}${PREFIX}/bin/
chmod 755 ${DESTDIR}${PREFIX}/bin/${EXE}
cp -f ${EXE}.1 ${DESTDIR}${MANPREFIX}/man1/podbit.1
uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/${EXE} \
${DESTDIR}${MANPREFIX}/man1/podbit.1
.PHONY: check clean install uninstall