cpint-2.5.3-build.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. --- cpint-2.5.3/Makefile
  2. +++ cpint-2.5.3/Makefile
  3. @@ -5,59 +5,29 @@
  4. prefix =
  5. bindir = /usr/sbin
  6. etcdir = /etc
  7. +krndir = /lib/modules/`uname -r`/misc
  8. -COMMAND = hcp mongen monstat actgen diag0
  9. -
  10. -tools: $(COMMAND)
  11. +CFLAGS += -Wall
  12. +CPPFLAGS += -I$(KERNEL_DIR)/include
  13. -hcp : hcp.o
  14. - $(CC) -o $@ $^
  15. +COMMAND = hcp mongen monstat actgen diag0
  16. -hcptest : hcptest.o
  17. - $(CC) -o $@ $^
  18. +all: $(COMMAND) cpint_mod.ko
  19. -mongen : mongen.o
  20. - $(CC) -o $@ $^
  21. +cpint_mod.ko:
  22. + $(MAKE) -C $(KERNEL_DIR) modules SUBDIRS=$(PWD)
  23. -actgen : actgen.o
  24. - $(CC) -o $@ $^
  25. +tools: $(COMMAND)
  26. monstat : monstat.o sysinfo.o
  27. - $(CC) -o $@ $^
  28. -
  29. -diag0 : diag0.o
  30. - $(CC) -o $@ $^
  31. -
  32. -hcp.o : hcp.c
  33. - $(CC) -o $@ $(INCLUDEDIR) -I. -O2 -c hcp.c
  34. -
  35. -hcptest.o : hcptest.c
  36. - $(CC) -o $@ $(INCLUDEDIR) -I. -O2 -c hcptest.c
  37. -
  38. -mongen.o : mongen.c
  39. - $(CC) -o $@ $(INCLUDEDIR) -I. -O2 -c mongen.c
  40. -
  41. -monstat.o : monstat.c
  42. - $(CC) -o $@ $(INCLUDEDIR) -I. -O2 -c monstat.c
  43. -
  44. -sysinfo.o : sysinfo.c
  45. - $(CC) -o $@ $(INCLUDEDIR) -I. -O2 -c sysinfo.c
  46. -
  47. -actgen.o : actgen.c
  48. - $(CC) -o $@ $(INCLUDEDIR) -I. -O2 -c actgen.c
  49. -
  50. -diag0.o : diag0.c
  51. - $(CC) -o $@ $(INCLUDEDIR) -I. -O2 -c diag0.c
  52. install: $(TARGET)
  53. + install -d -m 755 ${prefix}${bindir}
  54. install -c -m 750 mongen ${prefix}${bindir}
  55. install -c -m 750 monstat ${prefix}${bindir}
  56. install -c -m 750 hcp ${prefix}${bindir}
  57. - cp cpint_mod.ko /lib/modules/`uname -r`/kernel/drivers/s390/char/
  58. - rm -rf /dev/cpcmd /dev/cpmod /dev/cpappl /dev/cpid \
  59. - /dev/cpint0 /dev/cpint8 /dev/cpint76 /dev/cpint222
  60. - modprobe -qr cpint_mod
  61. - depmod -a
  62. + install -d -m 755 ${prefix}${krndir}
  63. + install -c -m 644 cpint_mod.ko ${prefix}${krndir}
  64. clean:
  65. rm -rf *.o *~ core mongen monstat actgen hcp diag0 *.ko *.cmd \