- take CC environment variable into account when building

- use cp and mkdir in the install rule instead of using the install
   utility
pull/52/head
John Tsiombikas 2022-01-28 19:34:43 +02:00
rodzic ccafde465a
commit 83b6124188
1 zmienionych plików z 4 dodań i 11 usunięć

Wyświetl plik

@ -5,8 +5,7 @@ dep = $(obj:.o=.d)
bin = spacenavd
ctl = spnavd_ctl
CC = gcc
INSTALL = install
CC ?= gcc
CFLAGS = -pedantic -Wall $(dbg) $(opt) -fno-strict-aliasing -fcommon \
-I$(srcdir)/src -I/usr/local/include -MMD $(add_cflags)
LDFLAGS = -L/usr/local/lib $(xlib) $(add_ldflags)
@ -32,18 +31,12 @@ cleandep:
.PHONY: install
install: $(bin)
$(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
$(INSTALL) -m 755 $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin)
$(INSTALL) -m 755 $(srcdir)/$(ctl) $(DESTDIR)$(PREFIX)/bin/$(ctl)
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin)
cp $(srcdir)/$(ctl) $(DESTDIR)$(PREFIX)/bin/$(ctl)
cd $(srcdir) && ./setup_init --no-install
# [ -d /etc/hal/fdi/policy ] && \
# $(INSTALL) -m 644 spacenav.fdi $(DESTDIR)/etc/hal/fdi/policy/spacenav.fdi
.PHONY: uninstall
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/$(bin)
rm -f $(DESTDIR)$(PREFIX)/bin/$(ctl)
rm -f $(DESTDIR)/etc/hal/fdi/policy/spacenav.fdi
# cd $(srcdir) && ./setup_init remove