-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
68 lines (50 loc) · 1.48 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
PKG_NAMES += libdrm
PKG_NAMES += libpng
PKG_NAMES += glib-2.0
PKG_NAMES += gio-2.0
PKG_NAMES += libsystemd
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 += -O2
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
DESTDIR ?= test-install-root # rpm-build overrides this
all:: $(TARGETS_BIN)
install:: all
install -m 755 -t $(DESTDIR)/usr/bin -D $(TARGETS_BIN)
distclean:: clean
clean:: mostlyclean
$(RM) $(TARGETS_BIN)
$(RM) *.o */*.o
mostlyclean::
$(RM) *.bak *~ */*.bak */*~
MINUI_SRC += minui/graphics.c
MINUI_SRC += minui/graphics_fbdev.c
MINUI_SRC += minui/events.c
MINUI_SRC += minui/resources.c
MINUI_SRC += minui/graphics_drm.c
YAMUI_SRC += yamui.c
YAMUI_SRC += os-update.c
YAMUI_SRC += $(MINUI_SRC)
YAMUI_OBJ := $(patsubst %.c, %.o, $(YAMUI_SRC))
yamui: $(YAMUI_OBJ)
SCREENSAVERD_SRC += yamui-screensaverd.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)