-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
66 lines (50 loc) · 999 Bytes
/
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
.SECONDEXPANSION:
VER_MAJ := 0
VER_MIN := 1
RELEASE ?= 0
DESTDIR ?= /usr
ifeq ($(RELEASE),1)
CFLAGS += -DDEBUG=0
VER_GIT :=
else
CFLAGS += -DDEBUG=1 -g
ifeq ($(VER_GIT),)
VER_GIT := $(shell git rev-parse --short HEAD || echo git)
endif
endif
DIR_OUT := out
DIR_BIN := $(DIR_OUT)/bin
DIR_OBJ := $(DIR_OUT)/obj
AR ?= ar
CC ?= gcc
CFLAGS += \
-Wall -Werror -O2 \
-DVERSION=\"$(VER_MAJ).$(VER_MIN)$(addprefix ~,$(VER_GIT))\" \
-I.
define local-dir
$(strip \
$(eval _mkfile := $$(lastword $$(MAKEFILE_LIST))) \
$(patsubst %/,%,$(dir $(_mkfile))))
endef
.PHONY: all
all:
.PHONY: clean
clean:
.PHONY: clobber
clobber:
rm -rf $(DIR_OUT)
.PHONY: install
install:
.PHONY: install-udev
install-udev:
install -Dm644 51-fitbit.rules $(DESTDIR)/lib/udev/rules.d/51-fitbit.rules
.PHONY: deps
deps:
@echo "All dependencies satisfied"
# daemon
include libant/Makefile
include libfitbit/Makefile
include fitbitd/Makefile
# clients
include libfitbitdcontrol/Makefile
include indicator/Makefile