aboutsummaryrefslogtreecommitdiff
blob: 7894e74aa055296f717d1265bbab4cfea39db0ba (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
CFLAGS += -Wall
BIN = fifo-cronolog
HELPER = fifo-cronolog-setup
SRC = $(BIN).c
OBJ = $(patsubst %.c,%.o,$(SRC))

BINDIR = /usr/sbin/
SYSTEMD_TARGET = /usr/lib/systemd/system/
SYSTEMD_UNIT = systemd/fifo-cronolog@.service

all: $(BIN)

$(BIN): $(OBJ)
	$(CC) $(LDFLAGS) -o $@ $<

.c.o:
	$(CC) $(CFLAGS) -c -o $@ $<

clean:
	$(RM) $(BIN) $(OBJ)

install:
	mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(SYSTEMD_TARGET)
	install -m0755 -D $(BIN) $(HELPER) $(DESTDIR)$(BINDIR)
	install -m0644 -D $(SYSTEMD_UNIT) $(DESTDIR)$(SYSTEMD_TARGET)

#  vim: set ts=4 sw=4 tw=80: