liberebus: moved public header to src/
[erebus2020] / erebus / Makefile
1 src = $(wildcard src/*.c)
2 obj = $(src:.c=.o)
3 dep = $(src:.c=.d)
4
5 bin = erebus
6
7 incdir = -I../liberebus/src
8 libdir = -L../liberebus
9
10 CFLAGS = -pedantic -Wall $(opt_dbg) $(opt_opt) $(incdir)
11 LDFLAGS = $(libdir) -lerebus
12
13 $(bin): $(obj)
14         $(CC) -o $@ $(obj) $(LDFLAGS)
15
16 -include $(dep)
17
18 .PHONY: clean
19 clean:
20         rm -f $(obj) $(bin)
21
22 .PHONY: cleandep
23 cleandep:
24         rm -f $(dep)
25
26 .PHONY: install
27 install: $(bin)
28         mkdir -p $(DESTDIR)$(PREFIX)/bin
29         cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin)
30
31 .PHONY: uninstall
32 uninstall:
33         rm -f $(DESTDIR)$(PREFIX)/bin/$(bin)