File: Makefile

package info (click to toggle)
fbcat 0.5.1-1
  • links: PTS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 156 kB
  • sloc: ansic: 258; xml: 232; sh: 138; makefile: 46
file content (37 lines) | stat: -rw-r--r-- 961 bytes parent folder | download
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
# Copyright © 2009-2017 Jakub Wilk
#
# This package is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 dated June, 1991.

CFLAGS ?= -g -O2
CFLAGS += -Wall -Wextra
CFLAGS += -D_FILE_OFFSET_BITS=64

PREFIX = /usr/local
DESTDIR =

.PHONY: all
all: fbcat

fbcat: fbcat.o
	$(LINK.c) $(^) $(LDLIBS) -o $(@)

.PHONY: install
install: fbcat
	install -d $(DESTDIR)$(PREFIX)/bin
	install -m755 fbcat $(DESTDIR)$(PREFIX)/bin/fbcat
	install -m755 fbgrab $(DESTDIR)$(PREFIX)/bin/fbgrab
ifeq "$(wildcard .git doc/fbcat.1 doc/fbgrab.1)" ".git"
	# run "$(MAKE) -C doc" to build the manpages
else
	install -d $(DESTDIR)$(PREFIX)/share/man/man1
	install -m644 doc/fbcat.1 $(DESTDIR)$(PREFIX)/share/man/man1/fbcat.1
	install -m644 doc/fbgrab.1 $(DESTDIR)$(PREFIX)/share/man/man1/fbgrab.1
endif

.PHONY: clean
clean:
	rm -f fbcat *.o

# vim:ts=4 sts=4 sw=4 noet