lbm2bin

annotate Makefile @ 5:03b2aa7ed478

added install/uninstall rules
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 20 Jul 2017 07:35:41 +0300
parents 0b96363742d3
children
rev   line source
nuclear@5 1 PREFIX = /usr/local
nuclear@5 2
nuclear@0 3 src = $(wildcard src/*.c)
nuclear@0 4 obj = $(src:.c=.o)
nuclear@0 5
nuclear@3 6 bin = lbm2bin
nuclear@0 7
nuclear@4 8 CFLAGS = -pedantic -Wall -g
nuclear@0 9 LDFLAGS = -lm
nuclear@0 10
nuclear@0 11 $(bin): $(obj)
nuclear@0 12 $(CC) -o $@ $(obj) $(LDFLAGS)
nuclear@0 13
nuclear@0 14 .PHONY: clean
nuclear@0 15 clean:
nuclear@0 16 rm -f $(obj) $(bin)
nuclear@5 17
nuclear@5 18 .PHONY: install
nuclear@5 19 install: $(bin)
nuclear@5 20 mkdir -p $(DESTDIR)$(PREFIX)/bin
nuclear@5 21 cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin)
nuclear@5 22
nuclear@5 23 .PHONY: uninstall
nuclear@5 24 uninstall:
nuclear@5 25 rm -f $(DESTDIR)$(PREFIX)/bin/$(bin)