File: Makefile

package info (click to toggle)
sleepd 1.3.7
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 128 kB
  • ctags: 98
  • sloc: ansic: 763; makefile: 57; sh: 52
file content (30 lines) | stat: -rw-r--r-- 785 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
27
28
29
30
CFLAGS		= -O2 -Wall -DACPI_APM
BINS		= sleepd sleepctl
PREFIX		= /
INSTALL_PROGRAM	= install

# DEB_BUILD_OPTIONS suport, to control binary stripping.
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif

# And debug building.
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
endif

all: $(BINS)

sleepd: sleepd.o acpi.o
	$(CC) -o sleepd sleepd.o acpi.o -lapm

clean:
	rm -f $(BINS) *.o

install: $(BINS)
	install -d $(PREFIX)/usr/sbin/ $(PREFIX)/usr/share/man/man8/ \
		$(PREFIX)/usr/bin/ $(PREFIX)/usr/share/man/man1/
	$(INSTALL_PROGRAM) sleepd $(PREFIX)/usr/sbin/
	install -m 0644 sleepd.8 $(PREFIX)/usr/share/man/man8/
	install -m 4755 -o root -g root -s sleepctl $(PREFIX)/usr/bin/
	install -m 0644 sleepctl.1 $(PREFIX)/usr/share/man/man1/