lspart
annotate Makefile @ 2:99bb8b4ef1bc
added install
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 29 Mar 2013 21:54:33 +0200 |
parents | 29d89c00e611 |
children |
rev | line source |
---|---|
nuclear@2 | 1 PREFIX = /usr/local |
nuclear@0 | 2 src = $(wildcard *.c) |
nuclear@0 | 3 obj = $(src:.c=.o) |
nuclear@0 | 4 bin = lspart |
nuclear@0 | 5 |
nuclear@0 | 6 CC = gcc |
nuclear@0 | 7 CFLAGS = -pedantic -Wall -g |
nuclear@0 | 8 |
nuclear@0 | 9 $(bin): $(obj) |
nuclear@0 | 10 $(CC) -o $@ $(obj) $(LDFLAGS) |
nuclear@0 | 11 |
nuclear@0 | 12 .PHONY: clean |
nuclear@0 | 13 clean: |
nuclear@0 | 14 rm -f $(obj) $(bin) |
nuclear@2 | 15 |
nuclear@2 | 16 .PHONY: install |
nuclear@2 | 17 install: |
nuclear@2 | 18 mkdir -p $(DESTDIR)$(PREFIX)/bin |
nuclear@2 | 19 cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin) |
nuclear@2 | 20 |
nuclear@2 | 21 .PHONY: uninstall |
nuclear@2 | 22 uninstall: |
nuclear@2 | 23 rm -f $(DESTDIR)$(PREFIX)/bin/$(bin) |