summaryrefslogtreecommitdiff
path: root/xpp/utils/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'xpp/utils/Makefile')
-rw-r--r--xpp/utils/Makefile24
1 files changed, 13 insertions, 11 deletions
diff --git a/xpp/utils/Makefile b/xpp/utils/Makefile
index 562c738..d840333 100644
--- a/xpp/utils/Makefile
+++ b/xpp/utils/Makefile
@@ -3,13 +3,14 @@ PEDANTIC = -ansi -pedantic -std=c99
CC = gcc
RANLIB = ranlib
INSTALL = install
+INSTALL_DATA = install -m 644
-BINDIR = /sbin
+BINDIR = /usr/sbin
DATADIR = /usr/share/zaptel
MANDIR = /usr/share/man/man8
HOTPLUG_USB_DIR = /etc/hotplug/usb
-DATA_FILES = ../init_data_*.cmd ../initialize_registers
+DATA_FILES = $(wildcard ../init_data_*.cmd *.hex)
CFLAGS = -g -Wall $(EXTRA_CFLAGS)
@@ -18,15 +19,16 @@ TARGETS = libhexfile.a fpga_load test_parse
all: $(TARGETS)
install: all
- $(INSTALL) -d $(BINDIR)
- $(INSTALL) genzaptelconf fpga_load $(BINDIR)/
- $(INSTALL) -d $(DATADIR)
- $(INSTALL) $(DATA_FILES) $(DATADIR)/
- $(INSTALL) -d $(MANDIR)
- $(INSTALL) fpga_load.8 $(MANDIR)/
- $(INSTALL) -d $(HOTPLUG_USB_DIR)
- $(INSTALL) xpp_fxloader xpp_fxloader.usermap $(HOTPLUG_USB_DIR)/
-
+ $(INSTALL) -d $(DESTDIR)$(BINDIR)
+ $(INSTALL) genzaptelconf fpga_load $(DESTDIR)$(BINDIR)/
+ $(INSTALL) -d $(DESTDIR)$(DATADIR)
+ $(INSTALL_DATA) $(DATA_FILES) $(DESTDIR)$(DATADIR)/
+ $(INSTALL) ../initialize_registers $(DESTDIR)$(DATADIR)/
+ $(INSTALL) -d $(DESTDIR)$(MANDIR)
+ $(INSTALL_DATA) fpga_load.8 genzaptelconf.8 $(DESTDIR)$(MANDIR)/
+ $(INSTALL) -d $(DESTDIR)$(HOTPLUG_USB_DIR)
+ $(INSTALL_DATA) xpp_fxloader.usermap $(DESTDIR)$(HOTPLUG_USB_DIR)/
+ $(INSTALL) xpp_fxloader $(DESTDIR)$(HOTPLUG_USB_DIR)/
libhexfile.a: hexfile.o
$(AR) cru $@ $^