-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile.am
124 lines (99 loc) · 2.75 KB
/
Makefile.am
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
ACLOCAL_AMFLAGS = -I m4
MAINTAINERCLEANFILES = \
Makefile.in \
aclocal.m4 \
compile \
config.guess \
config.sub \
configure \
depcomp \
install-sh \
missing
CLEANFILES = src/background.h data/background.ppm \
$(nodist_systemunit_DATA)
rootbindir = @rootdir@/bin
systemunitdir = @SYSTEMDSYSTEMUNITDIR@
rootbin_PROGRAMS = src/dietsplash
bin_PROGRAMS = src/dietsplashctl
if ENABLE_CUSTOM_BACKGROUND
background = @BACKGROUND_PATH@
else
background = $(abs_top_srcdir)/data/default_background.ppm
endif
if MAINTAINER_MODE
build_datadir = $(abs_top_builddir)/data
build_bindir = $(abs_top_builddir)/src
AM_CFLAGS = -DLOGLEVEL=4
else
build_datadir = $(data_dietsplashdir)
build_bindir = $(rootbindir)
AM_CFLAGS = -DLOGLEVEL=0
endif
AM_CFLAGS += -DDIETSPLASH_BIN=\""$(build_bindir)/dietsplash"\" \
-DREAL_INIT=\""@REAL_INIT@"\"
AM_CPPFLAGS = \
-include $(top_builddir)/config.h \
-I$(builddir)/src -I$(srcdir)/src
src_dietsplash_SOURCES = \
src/events.c \
src/events.h \
src/fb.c \
src/fb.h \
src/log.c \
src/log.h \
src/main.c \
src/pnmtologo.c \
src/pnmtologo.h \
src/util.c \
src/util.h
src_dietsplashctl_SOURCES = src/dietsplashctl.c
if !ENABLE_STATICIMAGES
data_dietsplashdir = $(pkgdatadir)
data_dietsplash_DATA = $(background)
AM_CFLAGS += -DBACKGROUND_FILE=\""$(build_datadir)/background.ppm"\"
src/fb.o: makebackground
makebackground: $(background)
if MAINTAINER_MODE
$(AM_V_GEN) \
( cd $(build_datadir) && rm -f background.ppm && \
$(LN_S) $(background) background.ppm )
endif
else
noinst_PROGRAMS = src/genstaticlogo
src_genstaticlogo_SOURCES = \
src/genstaticlogo.c \
src/pnmtologo.c \
src/pnmtologo.h \
src/util.c \
src/util.h
src/background.h: $(background) src/genstaticlogo
$(AM_V_GEN)src/genstaticlogo dietsplash_static_background $@ $<
src/fb.o: src/background.h
endif
EXTRA_DIST = data/default_background.ppm \
units/dietsplash-quit.service.in
nodist_systemunit_DATA = units/dietsplash-quit.service
SED_PROCESS = \
$(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
$(SED) -e 's,@bindir\@,$(bindir),g' \
< $< > $@ || rm $@
units/%: units/%.in Makefile
$(SED_PROCESS)
install-data-hook:
if MAINTAINER_MODE
( echo "You can't use maintainer-mode and install, please" \
"reconfigure before installing" 1>&2 && \
exit 1)
endif
if ENABLE_SYSTEMD
$(MKDIR_P) -m 0755 \
$(DESTDIR)$(systemunitdir)/multi-user.target.wants
( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
rm -f dietsplash-quit.service && \
$(LN_S) ../dietsplash-quit.service dietsplash-quit.service )
endif
if !ENABLE_STATICIMAGES
( cd $(DESTDIR)$(data_dietsplashdir) && \
rm -f background.ppm && \
$(LN_S) $(shell basename ${background}) background.ppm )
endif