mkb

represent a percentage as a fancy progress bar
git clone git://z3bra.org/mkb
Log | Files | Refs

Makefile (708B)


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
PREFIX:=/usr/local
MANPREFIX:=$(PREFIX)/share/man

CC      := cc
LD      := $(CC)

CFLAGS  += -pedantic -Wall
LDFLAGS +=

BIN = mkb
SRC = mkb.c
MAN = mkb.1

OBJ = $(SRC:.c=.o)

.POSIX:

all: binutils

binutils: $(BIN)

.o:
	@echo "LD $@"
	@$(LD) $< -o $@ $(LDFLAGS)

.c.o:
	@echo "CC $<"
	@$(CC) -c $< -o $@ $(CFLAGS)

install: $(BIN) $(MAN)
	mkdir -p $(DESTDIR)$(PREFIX)/bin/
	cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin/
	chmod 755 $(DESTDIR)$(PREFIX)/bin/$(BIN)
	mkdir -p $(DESTDIR)$(MANPREFIX)/man1/
	cp -f $(MAN) $(DESTDIR)$(MANPREFIX)/man1/
	chmod 644 $(DESTDIR)$(MANPREFIX)/man1/$(MAN)


uninstall:
	rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN)
	rm -f $(DESTDIR)$(MANPREFIX)/bin/$(MAN)

clean :
	rm -f $(OBJ) $(BIN)