aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 4eb3a1c1be5bb4be98856f6304ef0a43379f2b73 (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# runcap - run program and capture its output
# Copyright (C) 2017 Sergey Poznyakoff
#
# Runcap 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; either version 3 of the License, or (at your
# option) any later version.
#
# Runcap is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with Runcap. If not, see <http://www.gnu.org/licenses/>.

PREFIX = /usr
BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/share/man

MAN2DIR = $(MANDIR)/man2

# The install program.  Use cp(1) if not available.
INSTALL = install
# Program to make directory hierarchy.
MKHIER  = install -d

# Compiler options
O = -ggdb -Wall

SOURCES = runcap.c getc.c getl.c seek.c tell.c
OBJECTS = $(SOURCES:.c=.o)
HEADERS = runcap.h

CFLAGS  = $(O)
LDFLAGS =
ARFLAGS = cru

all: libruncap.a

$(OBJECTS): $(HEADERS)

libruncap.a: $(OBJECTS)
	ar $(ARFLAGS) libruncap.a $(OBJECTS)
	ranlib libruncap.a

install: install-lib install-headers install-man

install-lib: libruncap.a
	$(MKHIER) $(DESTDIR)$(LIBDIR)
	$(INSTALL) libruncap.a $(DESTDIR)$(LIBDIR)

install-headers: runcap.h
	$(MKHIER) $(DESTDIR)$(INCLUDEDIR)
	$(INSTALL) runcap.h $(DESTDIR)$(INCLUDEDIR)

install-man:;
#	$(MKHIER) $(DESTDIR)$(MAN2DIR)
#	$(INSTALL) runcap.2 $(DESTDIR)$(MAN2DIR)

.PHONY: check
check:
	$(MAKE) -C t check

Return to:

Send suggestions and report system problems to the System administrator.