Makefile 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. #
  2. # Copyright (c) 2002-2005 Volkswagen Group Electronic Research
  3. # All rights reserved.
  4. #
  5. # Redistribution and use in source and binary forms, with or without
  6. # modification, are permitted provided that the following conditions
  7. # are met:
  8. # 1. Redistributions of source code must retain the above copyright
  9. # notice, this list of conditions, the following disclaimer and
  10. # the referenced file 'COPYING'.
  11. # 2. Redistributions in binary form must reproduce the above copyright
  12. # notice, this list of conditions and the following disclaimer in the
  13. # documentation and/or other materials provided with the distribution.
  14. # 3. Neither the name of Volkswagen nor the names of its contributors
  15. # may be used to endorse or promote products derived from this software
  16. # without specific prior written permission.
  17. #
  18. # Alternatively, provided that this notice is retained in full, this
  19. # software may be distributed under the terms of the GNU General
  20. # Public License ("GPL") version 2 as distributed in the 'COPYING'
  21. # file from the main directory of the linux kernel source.
  22. #
  23. # The provided data structures and external interfaces from this code
  24. # are not restricted to be used by modules with a GPL compatible license.
  25. #
  26. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  27. # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  28. # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  29. # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  30. # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  31. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  32. # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  33. # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  34. # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  35. # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  36. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
  37. # DAMAGE.
  38. #
  39. # Send feedback to <linux-can@vger.kernel.org>
  40. DESTDIR ?=
  41. PREFIX ?= /usr/local
  42. MAKEFLAGS = -k
  43. CFLAGS = -O2 -Wall -Wno-parentheses
  44. CPPFLAGS += -Iinclude \
  45. -D_FILE_OFFSET_BITS=64 \
  46. -DSO_RXQ_OVFL=40 \
  47. -DPF_CAN=29 \
  48. -DAF_CAN=PF_CAN \
  49. -D_GNU_SOURCE
  50. PROGRAMS_ISOTP = isotpdump isotprecv isotpsend isotpsniffer isotptun isotpserver isotpperf
  51. PROGRAMS_CANGW = cangw
  52. PROGRAMS_SLCAN = slcan_attach slcand
  53. PROGRAMS_J1939 = jacd jspy jsr testj1939
  54. PROGRAMS = can-calc-bit-timing candump cansniffer cansend canplayer cangen canbusload\
  55. log2long log2asc asc2log\
  56. canlogserver bcmserver\
  57. $(PROGRAMS_ISOTP)\
  58. $(PROGRAMS_CANGW)\
  59. $(PROGRAMS_SLCAN)\
  60. $(PROGRAMS_J1939)\
  61. slcanpty canfdtest
  62. all: $(PROGRAMS)
  63. clean:
  64. rm -f $(PROGRAMS) *.o
  65. install:
  66. mkdir -p $(DESTDIR)$(PREFIX)/bin
  67. cp -f $(PROGRAMS) $(DESTDIR)$(PREFIX)/bin
  68. distclean:
  69. rm -f $(PROGRAMS) $(LIBRARIES) *.o *~
  70. cansend.o: lib.h
  71. cangen.o: lib.h
  72. candump.o: lib.h
  73. canplayer.o: lib.h
  74. canlogserver.o: lib.h
  75. canbusload.o: lib.h
  76. log2long.o: lib.h
  77. log2asc.o: lib.h
  78. asc2log.o: lib.h
  79. jacd.o: libj1939.h
  80. jspy.o: libj1939.h
  81. jsr.o: libj1939.h
  82. testj1939.o: libj1939.h
  83. canframelen.o: canframelen.h
  84. cansend: cansend.o lib.o
  85. cangen: cangen.o lib.o
  86. candump: candump.o lib.o
  87. canplayer: canplayer.o lib.o
  88. canlogserver: canlogserver.o lib.o
  89. log2long: log2long.o lib.o
  90. log2asc: log2asc.o lib.o
  91. asc2log: asc2log.o lib.o
  92. canbusload: canbusload.o canframelen.o
  93. jacd: jacd.o libj1939.o
  94. jspy: jspy.o libj1939.o
  95. jsr: jsr.o libj1939.o
  96. testj1939: testj1939.o libj1939.o