29 lines
418 B
Makefile
29 lines
418 B
Makefile
.PHONY: clean, mrproper, uninstall, install
|
|
CC = gcc
|
|
CFLAGS = -g -Wall
|
|
LDFLAGS =
|
|
|
|
PREFIX = /usr/local
|
|
|
|
all: bff
|
|
|
|
bff.o: bff.c
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
bff: bff.o
|
|
$(CC) $(CFLAGS) -o $@ $+
|
|
|
|
install: bff
|
|
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
|
cp -f bff $(DESTDIR)$(PREFIX)/bin
|
|
chmod 755 $(DESTDIR)$(PREFIX)/bin/bff
|
|
|
|
uninstall:
|
|
rm -f $(DESTDIR)$(PREFIX)/bin/bff
|
|
|
|
clean:
|
|
rm -f *.o core.*
|
|
|
|
mrproper: clean
|
|
rm -f bff
|