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