File: Makefile

package info (click to toggle)
restartd 0.2.3-1.1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye
  • size: 152 kB
  • sloc: ansic: 582; sh: 44; makefile: 20
file content (26 lines) | stat: -rw-r--r-- 698 bytes parent folder | download | duplicates (2)
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
# Restartd Makefile

C_ARGS = -Wall -O2
CC = gcc
INS = /usr/bin/install
VERSION = $(shell cat version)
all: restartd

install: restartd
	$(INS) -o root -g root -m 0640 restartd.conf $(DESTDIR)/etc
	$(INS) -o root -g root -m 0754 -b restartd $(DESTDIR)/usr/sbin
	$(INS) -o root -g root -m 0444 restartd.8 $(DESTDIR)/usr/share/man/man8
	$(INS) -o root -g root -m 0444 restartd.fr.8 $(DESTDIR)/usr/share/man/fr/man8/restartd.8

clean:
	rm -f *.o restartd

restartd: main.o config.o
	$(CC) -o restartd -DVERSION='"$(VERSION)"' main.o config.o
# strip restartd

main.o: main.c
	$(CC) $(C_ARGS) -DVERSION='"$(VERSION)"' -c main.c

config.o: config.c
	$(CC) $(C_ARGS) -DVERSION='"$(VERSION)"' -c config.c