* Honour CC, CFLAGS, LDFLAGS and DESTDIR. * Use absolute paths so it doesn't assume w_scan is ran from the build dir. * Joerg Bornkessel 2009 May 02 diff -Naur w_scan-20090516.orig/Makefile w_scan-20090516/Makefile --- w_scan-20090516.orig/Makefile 2009-05-16 16:58:12.065262724 +0200 +++ w_scan-20090516/Makefile 2009-05-16 16:59:32.115253677 +0200 @@ -12,6 +12,9 @@ OLDVERSION = $(shell sed -n '/SCRIPT_VERSION="/p' w_scan_start.sh | sed -e 's/SCRIPT_VERSION=//' | sed -e 's/;//') TMPDIR = w_scan-$(VERSION) +BINDIR = /usr/bin +SHAREDIR = /usr/share/w_scan + $(TARGET): $(OBJS) $(CC) $(LFLAGS) -o $(TARGET) $(OBJS) $(RM) *.o *.d @@ -41,14 +44,13 @@ echo "" >> version.h install: - install -m 755 $(TARGET) /usr/bin - install -m 755 w_scan_start.sh /usr/bin - mkdir -p /usr/share/w_scan - install pci.ids /usr/share/w_scan - install pci.classes /usr/share/w_scan - install usb.ids /usr/share/w_scan - install usb.classes /usr/share/w_scan - install doc/w_scan.1 /usr/share/man/man1 + @mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(SHAREDIR) + install -m 755 $(TARGET) $(DESTDIR)$(BINDIR) + install -m 755 w_scan_start.sh $(DESTDIR)$(BINDIR) + install pci.ids $(DESTDIR)$(SHAREDIR) + install pci.classes $(DESTDIR)$(SHAREDIR) + install usb.ids $(DESTDIR)$(SHAREDIR) + install usb.classes $(DESTDIR)$(SHAREDIR) dist: version scriptversion createpackage