]> git.cameronkatri.com Git - bsd-progress.git/blob - Makefile
progress: Port for Linux and Darwin
[bsd-progress.git] / Makefile
1 # $NetBSD: Makefile,v 1.2 2003/01/22 02:56:30 lukem Exp $
2
3 PROG= progress
4 SRCS= progress.c progressbar.c strsuftoll.c
5
6
7 CPPFLAGS +=-Iinclude -DSTANDALONE_PROGRESS
8 UNAME ?= $(shell uname)
9 PREFIX ?= /usr
10 PROG_PREFIX ?= bsd-
11
12 ifeq ($(UNAME), Linux)
13 ifeq ($(shell pkg-config libbsd-overlay && echo 1),1)
14 CPPFLAGS+=$(shell pkg-config libbsd-overlay --cflags)
15 LDFLAGS+=$(shell pkg-config libbsd-overlay --libs)
16 endif # ($(shell pkg-config libbsd-overlay && echo 1),1)
17 endif # ($(UNAME), Linux)
18
19 all: $(PROG)
20
21 $(PROG): $(SRCS:%.c=%.o)
22 $(CC) $(LDFLAGS) -o $@ $^
23
24 install: $(PROG) progress.1
25 install -Dm755 $(PROG) $(DESTDIR)$(PREFIX)/bin/$(PROG_PREFIX)$(PROG)
26 install -Dm644 progress.1 $(DESTDIR)$(PREFIX)/share/man/man1/$(PROG_PREFIX)progress.1
27
28 clean:
29 rm -f *.o $(PROG)
30
31 .PHONY: all install clean