]> git.sur5r.net Git - freertos/blob - Demo/ARM7_AT91FR40008_GCC/Makefile
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@14 1d2547de-c912-0410-9cb9...
[freertos] / Demo / ARM7_AT91FR40008_GCC / Makefile
1 #       FreeRTOS.org V4.0.3 - Copyright (C) 2003-2006 Richard Barry.\r
2 #\r
3 #       This file is part of the FreeRTOS.org distribution.\r
4 #\r
5 #       FreeRTOS.org is free software; you can redistribute it and/or modify\r
6 #       it under the terms of the GNU General Public License as published by\r
7 #       the Free Software Foundation; either version 2 of the License, or\r
8 #       (at your option) any later version.\r
9 #\r
10 #       FreeRTOS.org is distributed in the hope that it will be useful,\r
11 #       but WITHOUT ANY WARRANTY; without even the implied warranty of\r
12 #       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
13 #       GNU General Public License for more details.\r
14 #\r
15 #       You should have received a copy of the GNU General Public License\r
16 #       along with FreeRTOS.org; if not, write to the Free Software\r
17 #       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
18 #\r
19 #       A special exception to the GPL can be applied should you wish to distribute\r
20 #       a combined work that includes FreeRTOS.org, without being obliged to provide\r
21 #       the source code for any proprietary components.  See the licensing section \r
22 #       of http://www.FreeRTOS.org for full details of how and when the exception\r
23 #       can be applied.\r
24 #\r
25 #       ***************************************************************************\r
26 #       See http://www.FreeRTOS.org for documentation, latest information, license \r
27 #       and contact details.  Please ensure to read the configuration and relevant \r
28 #       port sections of the online documentation.\r
29 #       ***************************************************************************\r
30 \r
31 CC=arm-elf-gcc\r
32 OBJCOPY=arm-elf-objcopy\r
33 ARCH=arm-elf-ar\r
34 CRT0=boot.s\r
35 \r
36 #\r
37 # CFLAGS common to both the THUMB and ARM mode builds\r
38 #\r
39 CFLAGS=-Wall -D $(RUN_MODE) -D GCC_AT91FR40008 -I. -I../../Source/include \\r
40                 -I../Common/include $(DEBUG) -mcpu=arm7tdmi -T$(LDSCRIPT) \\r
41                 -Wcast-align $(OPTIM)\r
42 \r
43 ifeq ($(USE_THUMB_MODE),YES)\r
44         CFLAGS += -mthumb-interwork -D THUMB_INTERWORK\r
45         THUMB_FLAGS=-mthumb\r
46 endif\r
47 \r
48 \r
49 LINKER_FLAGS=-Xlinker -ortosdemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map\r
50 \r
51 #\r
52 # Source files that can be built to THUMB mode.\r
53 #\r
54 THUMB_SRC = \\r
55 main.c \\r
56 serial/serial.c \\r
57 ParTest/ParTest.c \\r
58 ../Common/Minimal/integer.c \\r
59 ../Common/Minimal/flash.c \\r
60 ../Common/Minimal/PollQ.c \\r
61 ../Common/Minimal/comtest.c \\r
62 ../Common/Minimal/flop.c \\r
63 ../Common/Minimal/semtest.c \\r
64 ../Common/Minimal/dynamic.c \\r
65 ../Common/Minimal/BlockQ.c \\r
66 ../../Source/tasks.c \\r
67 ../../Source/queue.c \\r
68 ../../Source/list.c \\r
69 ../../Source/portable/MemMang/heap_2.c \\r
70 ../../Source/portable/GCC/ARM7_AT91FR40008/port.c\r
71 \r
72 #\r
73 # Source files that must be built to ARM mode.\r
74 #\r
75 ARM_SRC = \\r
76 ../../Source/portable/GCC/ARM7_AT91FR40008/portISR.c \\r
77 serial/serialISR.c\r
78 \r
79 #\r
80 # Define all object files.\r
81 #\r
82 ARM_OBJ = $(ARM_SRC:.c=.o)\r
83 THUMB_OBJ = $(THUMB_SRC:.c=.o)\r
84 \r
85 rtosdemo.hex : rtosdemo.elf\r
86         $(OBJCOPY) rtosdemo.elf -O ihex rtosdemo.hex\r
87 \r
88 rtosdemo.elf : $(ARM_OBJ) $(THUMB_OBJ) $(CRT0) Makefile\r
89         $(CC) $(CFLAGS) $(ARM_OBJ) $(THUMB_OBJ) -nostartfiles $(CRT0) $(LINKER_FLAGS)\r
90 \r
91 $(THUMB_OBJ) : %.o : %.c $(LDSCRIPT) Makefile\r
92         $(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@\r
93 \r
94 $(ARM_OBJ) : %.o : %.c $(LDSCRIPT) Makefile\r
95         $(CC) -c $(CFLAGS) $< -o $@\r
96 \r
97 clean :\r
98         touch Makefile\r
99 \r