author | etisserant |
Mon, 31 Mar 2008 15:39:44 +0200 | |
changeset 436 | 77796b3e3428 |
parent 145 | e747d2e26af0 |
child 658 | 7758d60e9260 |
permissions | -rw-r--r-- |
0 | 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 |
CFLAGS = |
|
26 |
PROG_CFLAGS = SUB_PROG_CFLAGS |
|
27 |
OS_NAME = SUB_OS_NAME |
|
28 |
ARCH_NAME = SUB_ARCH_NAME |
|
29 |
PREFIX = SUB_PREFIX |
|
30 |
TARGET = SUB_TARGET |
|
31 |
INCLUDES = -I../../include -I../../include/hcs12 |
|
32 |
||
33 |
OPT_CFLAGS = -Os |
|
34 |
PROGDEFINES = -mnoshort -Wall -Wmissing-prototypes -fno-strict-aliasing |
|
35 |
PROGDEFINES_ASM = -mnoshort -Wall -Wmissing-prototypes |
|
36 |
||
37 |
OBJS = canOpenDriver.o interrupt.o ports.o |
|
38 |
||
39 |
all: driver |
|
40 |
||
41 |
driver: $(OBJS) |
|
42 |
||
43 |
libcandriver.a: $(OBJS) |
|
44 |
@echo " " |
|
45 |
@echo "*********************************************" |
|
46 |
@echo "**Building [libcandriver]" |
|
47 |
@echo "*********************************************" |
|
48 |
ar rc $@ $(OBJS) |
|
49 |
ranlib $@ |
|
50 |
||
51 |
%o: %c |
|
52 |
@echo " " |
|
53 |
@echo "*********************************************" |
|
54 |
@echo "**Compiling $< -> $@" |
|
55 |
@echo "*********************************************" |
|
56 |
$(CC) $(OPT_CFLAGS) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -c -o $@ $< |
|
57 |
||
58 |
%o: %s |
|
59 |
@echo " " |
|
60 |
@echo "*********************************************" |
|
61 |
@echo "**Compiling $< -> $@" |
|
62 |
@echo "*********************************************" |
|
63 |
$(CC) -c -x assembler-with-cpp $(PROG_CFLAGS) ${PROGDEFINES_ASM} -o $@ $< |
|
64 |
||
65 |
install: libcandriver.a |
|
66 |
mkdir -p ../../lib/hc12 |
|
67 |
mv libcandriver.a ../../lib/hc12 |
|
68 |
||
69 |
uninstall: |
|
70 |
rm -f ../../lib/hc12/libcandriver.a |
|
71 |
||
72 |
clean: |
|
40
ddeeb217ed71
Updated configure and fixes in Makefiles.in for cygwin compiling.
etisserant
parents:
0
diff
changeset
|
73 |
rm -f $(OBJS) |
0 | 74 |
|
75 |
mrproper: clean |
|
40
ddeeb217ed71
Updated configure and fixes in Makefiles.in for cygwin compiling.
etisserant
parents:
0
diff
changeset
|
76 |
rm -f ../../lib/hc12/libcandriver.a |
0 | 77 |