1 # $NetBSD: Makefile,v 1.2 2003/01/22 02:56:30 lukem Exp $
4 SRCS= progress.c progressbar.c strsuftoll.c
7 CPPFLAGS +=-Iinclude -DSTANDALONE_PROGRESS
8 UNAME ?= $(shell uname)
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)
21 $(PROG): $(SRCS:%.c=%.o)
22 $(CC) $(LDFLAGS) -o $@ $^
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
31 .PHONY: all install clean