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