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