author | lbessard |
Mon, 10 Dec 2007 16:46:11 +0100 | |
changeset 337 | 9aab477d8a8a |
parent 329 | 7717252e3ed9 |
child 454 | bc000083297a |
permissions | -rw-r--r-- |
166
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
1 |
#! gmake |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
2 |
|
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
3 |
# |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
4 |
# Copyright (C) 2006 Laurent Bessard |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
5 |
# |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
6 |
# This file is part of canfestival, a library implementing the canopen |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
7 |
# stack |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
8 |
# |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
9 |
# This library is free software; you can redistribute it and/or |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
10 |
# modify it under the terms of the GNU Lesser General Public |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
11 |
# License as published by the Free Software Foundation; either |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
12 |
# version 2.1 of the License, or (at your option) any later version. |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
13 |
# |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
14 |
# This library is distributed in the hope that it will be useful, |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
15 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
16 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
17 |
# Lesser General Public License for more details. |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
18 |
# |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
19 |
# You should have received a copy of the GNU Lesser General Public |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
20 |
# License along with this library; if not, write to the Free Software |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
21 |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
22 |
# |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
23 |
|
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
24 |
CC = SUB_CC |
329 | 25 |
CXX = SUB_CXX |
26 |
LD = SUB_LD |
|
166
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
27 |
OPT_CFLAGS = -O2 |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
28 |
CFLAGS = SUB_OPT_CFLAGS |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
29 |
PROG_CFLAGS = SUB_PROG_CFLAGS |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
30 |
EXE_CFLAGS = SUB_EXE_CFLAGS |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
31 |
OS_NAME = SUB_OS_NAME |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
32 |
ARCH_NAME = SUB_ARCH_NAME |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
33 |
PREFIX = SUB_PREFIX |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
34 |
TARGET = SUB_TARGET |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
35 |
CAN_DRIVER = SUB_CAN_DRIVER |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
36 |
TIMERS_DRIVER = SUB_TIMERS_DRIVER |
267
96c688ebcde7
Add win32 target (--can=win32) to compile with msys and mingw32
greg
parents:
168
diff
changeset
|
37 |
TESTMASTERMICROMOD = "TestMasterMicroMod" |
166
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
38 |
INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER) -I../../include/$(TIMERS_DRIVER) |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
39 |
|
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
40 |
MASTER_OBJS = TestMaster.o TestMasterMicroMod.o |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
41 |
|
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
42 |
OBJS = $(MASTER_OBJS) ../../src/libcanfestival.a ../../drivers/$(TARGET)/libcanfestival_$(TARGET).a |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
43 |
|
267
96c688ebcde7
Add win32 target (--can=win32) to compile with msys and mingw32
greg
parents:
168
diff
changeset
|
44 |
ifeq ($(TARGET),win32) |
96c688ebcde7
Add win32 target (--can=win32) to compile with msys and mingw32
greg
parents:
168
diff
changeset
|
45 |
TESTMASTERMICROMOD = "TestMasterMicroMod.exe" |
96c688ebcde7
Add win32 target (--can=win32) to compile with msys and mingw32
greg
parents:
168
diff
changeset
|
46 |
endif |
96c688ebcde7
Add win32 target (--can=win32) to compile with msys and mingw32
greg
parents:
168
diff
changeset
|
47 |
|
96c688ebcde7
Add win32 target (--can=win32) to compile with msys and mingw32
greg
parents:
168
diff
changeset
|
48 |
ifeq ($(TIMERS_DRIVER),timers_win32) |
96c688ebcde7
Add win32 target (--can=win32) to compile with msys and mingw32
greg
parents:
168
diff
changeset
|
49 |
EXE_CFLAGS = |
96c688ebcde7
Add win32 target (--can=win32) to compile with msys and mingw32
greg
parents:
168
diff
changeset
|
50 |
endif |
96c688ebcde7
Add win32 target (--can=win32) to compile with msys and mingw32
greg
parents:
168
diff
changeset
|
51 |
|
166
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
52 |
ifeq ($(TIMERS_DRIVER),timers_xeno) |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
53 |
PROGDEFINES = -DUSE_XENO |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
54 |
endif |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
55 |
|
329 | 56 |
all: $(TESTMASTERMICROMOD) |
166
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
57 |
|
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
58 |
../../drivers/$(TARGET)/libcanfestival_$(TARGET).a: |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
59 |
$(MAKE) -C ../../drivers/$(TARGET) libcanfestival_$(TARGET).a |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
60 |
|
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
61 |
|
329 | 62 |
$(TESTMASTERMICROMOD): $(OBJS) |
63 |
$(LD) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ $(OBJS) $(EXE_CFLAGS) |
|
166
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
64 |
|
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
65 |
|
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
66 |
TestMaster.c: TestMaster.od |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
67 |
$(MAKE) -C ../../objdictgen gnosis |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
68 |
python ../../objdictgen/objdictgen.py TestMaster.od TestMaster.c |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
69 |
|
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
70 |
%o: %c |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
71 |
$(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $< |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
72 |
|
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
73 |
clean: |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
74 |
rm -f $(MASTER_OBJS) |
267
96c688ebcde7
Add win32 target (--can=win32) to compile with msys and mingw32
greg
parents:
168
diff
changeset
|
75 |
rm -f $(TESTMASTERMICROMOD) |
166
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
76 |
|
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
77 |
mrproper: clean |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
78 |
rm -f TestMaster.c |
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
79 |
|
168 | 80 |
install: TestMasterMicroMod |
81 |
mkdir -p $(PREFIX)/bin/ |
|
82 |
cp $< $(PREFIX)/bin/ |
|
83 |
||
84 |
uninstall: |
|
85 |
rm -f $(PREFIX)/bin/TestMasterMicroMod |
|
166
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
86 |
|
b6fbc1c59a44
Added a MicroMod Master sample in examples/TestMasterMicroMod. Fixed some SDO abort code and callback problem in sdo.c.
etisserant
parents:
diff
changeset
|
87 |