tinywebd
annotate Makefile @ 13:a9ed0b2260ee
reworded the readme slightly
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 19 Apr 2015 00:10:13 +0300 |
parents | 9c9e24956d99 |
children | 4a25751fe61d |
rev | line source |
---|---|
nuclear@0 | 1 src = $(wildcard src/*.c) |
nuclear@0 | 2 obj = $(src:.c=.o) |
nuclear@0 | 3 dep = $(obj:.o=.d) |
nuclear@0 | 4 bin = tinywebd |
nuclear@10 | 5 weblib = libtinyweb/libtinyweb.so |
nuclear@0 | 6 |
nuclear@10 | 7 CFLAGS = -pedantic -Wall -g -Ilibtinyweb/src |
nuclear@10 | 8 LDFLAGS = -Llibtinyweb -Wl,-rpath=libtinyweb -ltinyweb |
nuclear@0 | 9 |
nuclear@10 | 10 $(bin): $(obj) $(weblib) |
nuclear@0 | 11 $(CC) -o $@ $(obj) $(LDFLAGS) |
nuclear@0 | 12 |
nuclear@10 | 13 $(weblib): |
nuclear@10 | 14 $(MAKE) -C libtinyweb |
nuclear@10 | 15 |
nuclear@0 | 16 -include $(dep) |
nuclear@0 | 17 |
nuclear@0 | 18 %.d: %.c |
nuclear@0 | 19 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@0 | 20 |
nuclear@0 | 21 .PHONY: clean |
nuclear@0 | 22 clean: |
nuclear@0 | 23 rm -f $(obj) $(bin) |
nuclear@10 | 24 |
nuclear@10 | 25 .PHONY: install |
nuclear@10 | 26 install: $(bin) |
nuclear@10 | 27 mkdir -p $(PREFIX)/bin |
nuclear@10 | 28 cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin) |
nuclear@10 | 29 |
nuclear@10 | 30 .PHONY: uninstall |
nuclear@10 | 31 uninstall: |
nuclear@10 | 32 rm -f $(DESTDIR)$(PREFIX)/bin/$(bin) |