dterm-nuc
annotate Makefile @ 1:5a80b73208dd
improved makefile
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 07 Apr 2017 23:54:55 +0300 |
parents | ad098a33fd34 |
children |
rev | line source |
---|---|
nuclear@1 | 1 PREFIX = /usr/local |
nuclear@1 | 2 VERSION = 0.4 |
nuclear@0 | 3 |
nuclear@1 | 4 obj = dterm.o |
nuclear@1 | 5 bin = dterm |
nuclear@0 | 6 |
nuclear@1 | 7 CFLAGS = -pedantic -Wall -Werror -Os -DVERSION='"$(VERSION)"' |
nuclear@0 | 8 |
nuclear@1 | 9 $(bin): $(obj) |
nuclear@1 | 10 $(CC) -o $@ $(obj) $(LDFLAGS) |
nuclear@1 | 11 |
nuclear@1 | 12 .PHONY: install |
nuclear@1 | 13 install: $(bin) |
nuclear@1 | 14 mkdir -p $(DESTDIR)$(PREFIX)/bin |
nuclear@1 | 15 cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin) |
nuclear@1 | 16 |
nuclear@1 | 17 .PHONY: uninstall |
nuclear@1 | 18 uninstall: |
nuclear@1 | 19 rm -f $(DESTDIR)$(PREFIX)/bin/$(bin) |
nuclear@1 | 20 |
nuclear@1 | 21 .PHONY: clean |
nuclear@0 | 22 clean: |
nuclear@1 | 23 rm -f $(bin) $(obj) |
nuclear@0 | 24 |
nuclear@1 | 25 .PHONY: package |
nuclear@1 | 26 package: dterm.c LICENCE.txt README.txt Makefile |
nuclear@1 | 27 mkdir -p dterm-$(VERSION) |
nuclear@1 | 28 cp dterm.c LICENCE.txt README.txt Makefile dterm-$(VERSION) |
nuclear@1 | 29 tar czvf dterm-$(VERSION).tar.gz dterm-$(VERSION) |
nuclear@1 | 30 rm -rf dterm-$(VERSION) |