summaryrefslogtreecommitdiff
path: root/Makefile.in
blob: cbd4cdf5777cc4272e63391f8742e00513c23037 (plain)
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
# @configure_input@

VPATH = @abs_srcdir@
abs_srcdir = @abs_srcdir@

prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
sbindir = @sbindir@
sysconfdir = @sysconfdir@
localstatedir = @localstatedir@
mandir = @mandir@
systemdsystemunitdir = @systemdsystemunitdir@

CC = @CC@
CFLAGS = -Wall -Wextra -pedantic @CFLAGS@ -MD -MP -UNDEBUG -include @abs_top_builddir@/config.h
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@

SRC := random-seed.c sha2.c util.c
OBJ := $(SRC:.c=.o)
DEP := $(SRC:.c=.d)
TEST_FILE := random-seed.test

all: random-seed

random-seed: $(OBJ)

install: random-seed
	install -D -m755 random-seed $(sbindir)/random-seed
	install -D -m644 $(abs_srcdir)/random-seed.8 $(mandir)/man8/random-seed.8
ifneq ($(systemdsystemunitdir),)
	install -D -m644 $(abs_srcdir)/random-seed.service $(systemdsystemunitdir)/random-seed.service
endif

test: $(TEST_FILE)

$(TEST_FILE): random-seed
	./random-seed save $(TEST_FILE)
	./random-seed load $(TEST_FILE)

clean:
	$(RM) random-seed $(OBJ) $(DEP) $(TEST_FILE)

-include $(DEP)

.PHONY: all install test clean
.INTERMEDIATE: $(TEST_FILE)