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