Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 71 lines (58 sloc) 1.782 kB
e5a8d5b @falconindy standardize file headers and add MIT licensee
authored
1 #
2 # Makefile
3 #
4 # This file is part of geninit.
5 #
6
75052c2 @falconindy initial commit
authored
7 VERSION = 0.1
8
0eb2d67 @falconindy merge dinit into base directory
authored
9 all: init doc
75052c2 @falconindy initial commit
authored
10
0eb2d67 @falconindy merge dinit into base directory
authored
11 CC ?= cc
12 CPPFLAGS +=
db406fc @falconindy cleanup Makefile
authored
13 CFLAGS += -std=c99 -Wall -pedantic -Wextra ${CPPFLAGS}
0eb2d67 @falconindy merge dinit into base directory
authored
14 LDFLAGS := -lblkid ${LDFLAGS}
15
af8ca64 @falconindy add dist target
authored
16 DISTFILES := \
17 builders/ \
18 hooks/ \
19 geninit.conf \
20 geninit.api \
f2136d7 @falconindy add quirks file for quirky modules
authored
21 geninit.quirks \
af8ca64 @falconindy add dist target
authored
22 geninit \
fedd108 @falconindy add new util: lsinitramfs
authored
23 lsinitramfs \
af8ca64 @falconindy add dist target
authored
24 init.c \
25 example.preset \
26 Makefile
27
0eb2d67 @falconindy merge dinit into base directory
authored
28 init: init.c
29 ${CC} -c ${CFLAGS} ${CPPFLAGS} init.c
30 ${CC} -o $@ ${LDFLAGS} init.o
31
1373c3e @falconindy add install-doc target
authored
32 install-doc: doc
33 install -Dm644 geninit.8 ${DESTDIR}${PREFIX}/share/man/man8/geninit.8
34
35 install: init install-doc
db406fc @falconindy cleanup Makefile
authored
36 install -dm755 ${DESTDIR}${PREFIX}/share/geninit/builders
37 install -dm755 ${DESTDIR}${PREFIX}/share/geninit/hooks
38 install -dm755 ${DESTDIR}${PREFIX}/sbin
fedd108 @falconindy add new util: lsinitramfs
authored
39 install -dm755 ${DESTDIR}${PREFIX}/bin
db406fc @falconindy cleanup Makefile
authored
40 install -Dm644 geninit.conf ${DESTDIR}/etc/geninit.conf
224a47b @falconindy add example.preset to Makefile install target
authored
41 install -Dm644 example.preset ${DESTDIR}/etc/geninit.d/example.preset
db406fc @falconindy cleanup Makefile
authored
42 install -m755 -t ${DESTDIR}${PREFIX}/share/geninit/hooks hooks/*
43 install -m644 -t ${DESTDIR}${PREFIX}/share/geninit/builders builders/*
6be8bf1 @falconindy install quirks file
authored
44 install -m644 -t ${DESTDIR}${PREFIX}/share/geninit geninit.api geninit.quirks
db406fc @falconindy cleanup Makefile
authored
45 install -m755 -t ${DESTDIR}${PREFIX}/share/geninit init
fedd108 @falconindy add new util: lsinitramfs
authored
46 install -m755 -t ${DESTDIR}${PREFIX}/bin lsinitramfs
40017fc @falconindy foolish typo in Makefile
authored
47 sed "s#^\(declare.\+_sharedir\)=.*#\1=${PREFIX}/share/geninit#" < geninit > ${DESTDIR}${PREFIX}/sbin/geninit
af8ca64 @falconindy add dist target
authored
48 chmod 755 ${DESTDIR}${PREFIX}/sbin/geninit
75052c2 @falconindy initial commit
authored
49 .PHONY: install
50
0eb2d67 @falconindy merge dinit into base directory
authored
51 strip: init
52 strip --strip-all init
db406fc @falconindy cleanup Makefile
authored
53 .PHONY: strip
0eb2d67 @falconindy merge dinit into base directory
authored
54
855cefa @falconindy add the beginnings of a man page
authored
55 doc: geninit.8
56 geninit.8: README.pod
57 pod2man --section=8 --center="geninit manual" --name="GENINIT" --release="geninit ${VERSION}" $< > $@
75052c2 @falconindy initial commit
authored
58 .PHONY: doc
59
af8ca64 @falconindy add dist target
authored
60 dist:
61 mkdir geninit-${VERSION}
62 cp -r ${DISTFILES} geninit-${VERSION}
63 tar czf geninit-${VERSION}.tar.gz ${DISTFILES}
64 ${RM} -r geninit-${VERSION}
65 .PHONY:
66
75052c2 @falconindy initial commit
authored
67 clean:
a301e66 @falconindy remove generated manpage as part of cleaning
authored
68 ${RM} init.o init geninit.8
db406fc @falconindy cleanup Makefile
authored
69 .PHONY: clean
75052c2 @falconindy initial commit
authored
70
Something went wrong with that request. Please try again.