forked from sailfishos/yamui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
81 lines (60 loc) · 1.77 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
PKG_NAMES += libdrm
PKG_NAMES += libpng
PKG_CONFIG := pkg-config
PKG_CFLAGS := $(shell $(PKG_CONFIG) --cflags $(PKG_NAMES))
PKG_LDLIBS := $(shell $(PKG_CONFIG) --libs $(PKG_NAMES))
CPPFLAGS += -D_GNU_SOURCE
CPPFLAGS += -DOVERSCAN_PERCENT=0
CFLAGS += -std=c99
CFLAGS += -O3
CFLAGS += -Wall
CFLAGS += -Wextra
CFLAGS += $(PKG_CFLAGS)
CFLAGS += -Wno-missing-field-initializers
LDLIBS += -Wl,--as-needed
LDLIBS += $(PKG_LDLIBS)
TARGETS_BIN += yamui
TARGETS_BIN += yamui-screensaverd
TARGETS_BIN += yamui-powerkey
TARGETS_BIN += mstime
TARGETS_LNK += ustime
TARGETS_LNK += nstime
DESTDIR ?= test-install-root # rpm-build overrides this
all:: $(TARGETS_BIN)
strip $(TARGETS_BIN)
ln -sf mstime ustime
ln -sf mstime nstime
du -b $(TARGETS_BIN)
install:: all
install -m 755 -t $(DESTDIR)/usr/bin -D $(TARGETS_BIN) $(TARGETS_LNK)
distclean:: clean
clean:: mostlyclean
$(RM) $(TARGETS_BIN)
$(RM) *.o */*.o
mostlyclean::
$(RM) *.bak *~ */*.bak */*~
MINUI_SRC += minui/graphics.c
MINUI_SRC += minui/events.c
MINUI_SRC += minui/resources.c
MINUI_SRC += minui/graphics_drm.c
MINUI_SRC += minui/graphics_fbdev.c
MSTIME_SRC += mstime.c
MSTIME_SRC += get_time_ms.c
MSTIME_OBJ := $(patsubst %.c, %.o, $(MSTIME_SRC))
mstime: $(MSTIME_OBJ)
YAMUI_SRC += yamui.c
YAMUI_SRC += os-update.c
YAMUI_SRC += get_time_ms.c
YAMUI_SRC += $(MINUI_SRC)
YAMUI_OBJ := $(patsubst %.c, %.o, $(YAMUI_SRC))
yamui: $(YAMUI_OBJ)
SCREENSAVERD_SRC += yamui-screensaverd.c
SCREENSAVERD_SRC += get_time_ms.c
SCREENSAVERD_SRC += yamui-tools.c
#SCREENSAVERD_SRC += $(MINUI_SRC)
SCREENSAVERD_OBJ := $(patsubst %.c, %.o, $(SCREENSAVERD_SRC))
yamui-screensaverd: $(SCREENSAVERD_OBJ)
POWERKEY_SRC += yamui-powerkey.c
POWERKEY_SRC += yamui-tools.c
POWERKEY_OBJ := $(patsubst %.c, %.o, $(POWERKEY_SRC))
yamui-powerkey: $(POWERKEY_OBJ)