1
0

patch-Makefile 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. --- pcmciautils-017.orig/Makefile 2010-01-06 16:47:45.000000000 +0100
  2. +++ pcmciautils-017/Makefile 2011-07-15 12:41:55.000000000 +0200
  3. @@ -94,16 +94,19 @@ PWD = $(shell pwd)
  4. # If you are running a cross compiler, you may want to set this
  5. # to something more interesting, like "arm-linux-". If you want
  6. # to compile vs uClibc, that can be done here as well.
  7. -CROSS = #/usr/i386-linux-uclibc/usr/bin/i386-uclibc-
  8. +CROSS ?= #/usr/i386-linux-uclibc/usr/bin/i386-uclibc-
  9. CC = $(CROSS)gcc
  10. LD = $(CROSS)gcc
  11. AR = $(CROSS)ar
  12. STRIP = $(CROSS)strip
  13. RANLIB = $(CROSS)ranlib
  14. +LEX = flex
  15. HOSTCC = gcc
  16. export CROSS CC AR STRIP RANLIB CFLAGS LDFLAGS LIB_OBJS ARCH_LIB_OBJS CRT0
  17. +CFLAGS ?=
  18. +
  19. # code taken from uClibc to determine the current arch
  20. ARCH := ${shell $(CC) -dumpmachine | sed -e s'/-.*//' -e 's/i.86/i386/' -e 's/sparc.*/sparc/' \
  21. -e 's/arm.*/arm/g' -e 's/m68k.*/m68k/' -e 's/powerpc/ppc/g'}
  22. @@ -215,7 +218,7 @@ all: ccdv $(PCCARDCTL) $(PCMCIA_CHECK_BR
  23. ccdv: build/ccdv
  24. build/ccdv: build/ccdv.c
  25. @echo "Building ccdv"
  26. - @$(HOSTCC) -O1 $< -o $@
  27. + $(HOSTCC) $(CFLAGS_FOR_BUILD) -O1 $< -o $@
  28. %.o : %.c ccdv
  29. $(QUIET) $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
  30. @@ -264,30 +267,31 @@ clean:
  31. install-hotplug:
  32. $(INSTALL) -d $(DESTDIR)$(hotplugdir)
  33. - $(INSTALL_PROGRAM) -D hotplug/pcmcia.agent $(DESTDIR)$(hotplugdir)/pcmcia.agent
  34. - $(INSTALL_PROGRAM) -D hotplug/pcmcia.rc $(DESTDIR)$(hotplugdir)/pcmcia.rc
  35. + $(INSTALL_PROGRAM) hotplug/pcmcia.agent $(DESTDIR)$(hotplugdir)/pcmcia.agent
  36. + $(INSTALL_PROGRAM) hotplug/pcmcia.rc $(DESTDIR)$(hotplugdir)/pcmcia.rc
  37. uninstall-hotplug:
  38. - rm -f $(DESTDIR)$(hotplugdir)/pcmcia.agent $(DESTDIR)$(hotplugdir)/pcmcia.rc
  39. install-socket-hotplug:
  40. - $(INSTALL_PROGRAM) -D hotplug/pcmcia_socket.agent $(DESTDIR)$(hotplugdir)/pcmcia_socket.agent
  41. - $(INSTALL_PROGRAM) -D hotplug/pcmcia_socket.rc $(DESTDIR)$(hotplugdir)/pcmcia_socket.rc
  42. + $(INSTALL_PROGRAM) hotplug/pcmcia_socket.agent $(DESTDIR)$(hotplugdir)/pcmcia_socket.agent
  43. + $(INSTALL_PROGRAM) hotplug/pcmcia_socket.rc $(DESTDIR)$(hotplugdir)/pcmcia_socket.rc
  44. uninstall-socket-hotplug:
  45. - rm -f $(DESTDIR)$(hotplugdir)/pcmcia_socket.agent $(DESTDIR)$(hotplugdir)/pcmcia_socket.rc
  46. install-socket-tools:
  47. - $(INSTALL_PROGRAM) -D $(PCMCIA_SOCKET_STARTUP) $(DESTDIR)$(udevhelperdir)/$(PCMCIA_SOCKET_STARTUP)
  48. + $(INSTALL_PROGRAM) $(PCMCIA_SOCKET_STARTUP) $(DESTDIR)$(udevhelperdir)/$(PCMCIA_SOCKET_STARTUP)
  49. uninstall-socket-tools:
  50. - rm -f $(DESTDIR)$(udevhelperdir)/$(PCMCIA_SOCKET_STARTUP)
  51. install-tools:
  52. $(INSTALL) -d $(DESTDIR)$(sbindir)
  53. - $(INSTALL_PROGRAM) -D $(PCCARDCTL) $(DESTDIR)$(sbindir)/$(PCCARDCTL)
  54. + $(INSTALL_PROGRAM) $(PCCARDCTL) $(DESTDIR)$(sbindir)/$(PCCARDCTL)
  55. $(SYMLINK) $(PCCARDCTL) $(DESTDIR)$(sbindir)/$(LSPCMCIA)
  56. - $(INSTALL_PROGRAM) -D $(PCMCIA_CHECK_BROKEN_CIS) $(DESTDIR)$(udevhelperdir)/$(PCMCIA_CHECK_BROKEN_CIS)
  57. + $(INSTALL) -d $(DESTDIR)$(udevhelperdir)
  58. + $(INSTALL_PROGRAM) $(PCMCIA_CHECK_BROKEN_CIS) $(DESTDIR)$(udevhelperdir)/$(PCMCIA_CHECK_BROKEN_CIS)
  59. uninstall-tools:
  60. - rm -f $(DESTDIR)$(sbindir)/$(PCCARDCTL)
  61. @@ -296,22 +300,24 @@ uninstall-tools:
  62. install-config:
  63. $(INSTALL) -d $(DESTDIR)$(pcmciaconfdir)
  64. - $(INSTALL_DATA) -D config/config.opts $(DESTDIR)$(pcmciaconfdir)/config.opts
  65. + $(INSTALL_DATA) config/config.opts $(DESTDIR)$(pcmciaconfdir)/config.opts
  66. if [ -f config/config.opts.$(ARCH) ]; then \
  67. - $(INSTALL_DATA) -D config/config.opts.$(ARCH) $(DESTDIR)$(pcmciaconfdir)/config.opts; \
  68. + $(INSTALL_DATA) config/config.opts.$(ARCH) $(DESTDIR)$(pcmciaconfdir)/config.opts; \
  69. fi
  70. uninstall-config:
  71. # - rm -f $(DESTDIR)$(pcmciaconfdir)/config.opts
  72. install-udev:
  73. - $(INSTALL_DATA) -D $(UDEV_RULES_FILE) $(DESTDIR)$(udevrulesdir)/60-pcmcia.rules
  74. + $(INSTALL) -d $(DESTDIR)$(udevrulesdir)
  75. + $(INSTALL_DATA) $(UDEV_RULES_FILE) $(DESTDIR)$(udevrulesdir)/60-pcmcia.rules
  76. uninstall-udev:
  77. - rm -f $(DESTDIR)$(udevrulesdir)/60-pcmcia.rules
  78. install-man:
  79. - $(INSTALL_DATA) -D man/man8/pccardctl.8 $(DESTDIR)$(mandir)/man8/pccardctl.8
  80. + $(INSTALL) -d $(DESTDIR)$(mandir)/man8
  81. + $(INSTALL_DATA) man/man8/pccardctl.8 $(DESTDIR)$(mandir)/man8/pccardctl.8
  82. $(SYMLINK) pccardctl.8 $(DESTDIR)$(mandir)/man8/lspcmcia.8
  83. uninstall-man: