1 #! gmake |
|
2 |
|
3 # |
|
4 # Copyright (C) 2006 Laurent Bessard |
|
5 # |
|
6 # This file is part of canfestival, a library implementing the canopen |
|
7 # stack |
|
8 # |
|
9 # This library is free software; you can redistribute it and/or |
|
10 # modify it under the terms of the GNU Lesser General Public |
|
11 # License as published by the Free Software Foundation; either |
|
12 # version 2.1 of the License, or (at your option) any later version. |
|
13 # |
|
14 # This library is distributed in the hope that it will be useful, |
|
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
17 # Lesser General Public License for more details. |
|
18 # |
|
19 # You should have received a copy of the GNU Lesser General Public |
|
20 # License along with this library; if not, write to the Free Software |
|
21 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
22 # |
|
23 |
|
24 CC = SUB_CC |
|
25 OPT_CFLAGS = -O2 |
|
26 CFLAGS = SUB_OPT_CFLAGS |
|
27 PROG_CFLAGS = SUB_PROG_CFLAGS |
|
28 OS_NAME = SUB_OS_NAME |
|
29 ARCH_NAME = SUB_ARCH_NAME |
|
30 PREFIX = SUB_PREFIX |
|
31 TARGET = SUB_TARGET |
|
32 |
|
33 LIBPATH = /usr/lib |
|
34 LIBINC = /usr/include |
|
35 LIB = -L$(LIBPATH) -lpcan |
|
36 |
|
37 INCLUDES = -I../../include -I../../include/peak |
|
38 |
|
39 MASTER_OBJS = objdict.o appli.o |
|
40 |
|
41 OBJS = $(MASTER_OBJS) ../../src/peak_pdo.o ../../src/peak_sdo.o ../../src/peak_init.o ../../src/peak_sync.o\ |
|
42 ../../src/peak_objacces.o ../../src/peak_lifegrd.o ../../src/peak_timer.o ../../src/peak_nmtMaster.o\ |
|
43 ../../drivers/peak/canOpenDriver.o ../../drivers/peak/timerhw.o |
|
44 |
|
45 |
|
46 all: AppliMaster |
|
47 |
|
48 AppliMaster: $(OBJS) |
|
49 $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -lpthread -lstdc++ $(OBJS) $(LIB) |
|
50 |
|
51 %o: %c |
|
52 $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -D_REENTRANT -c $< |
|
53 |
|
54 clean: |
|
55 -rm $(MASTER_OBJS) |
|
56 |
|
57 mrproper: clean |
|
58 -rm AppliMaster |
|
59 |
|
60 |
|
61 |
|