]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/ARM7_AT91FR40008_GCC/Makefile
Update version number ready for next release.
[freertos] / FreeRTOS / Demo / ARM7_AT91FR40008_GCC / Makefile
1 #/*\r
2 # * FreeRTOS Kernel V10.2.1\r
3 # * Copyright (C) 2019 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
4 # *\r
5 # * Permission is hereby granted, free of charge, to any person obtaining a copy of\r
6 # * this software and associated documentation files (the "Software"), to deal in\r
7 # * the Software without restriction, including without limitation the rights to\r
8 # * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\r
9 # * the Software, and to permit persons to whom the Software is furnished to do so,\r
10 # * subject to the following conditions:\r
11 # *\r
12 # * The above copyright notice and this permission notice shall be included in all\r
13 # * copies or substantial portions of the Software.\r
14 # *\r
15 # * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
16 # * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\r
17 # * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\r
18 # * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\r
19 # * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
20 # * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
21 # *\r
22 # * http://www.FreeRTOS.org\r
23 # * http://aws.amazon.com/freertos\r
24 # *\r
25 # * 1 tab == 4 spaces!\r
26 # */\r
27 \r
28 CC=arm-elf-gcc\r
29 OBJCOPY=arm-elf-objcopy\r
30 ARCH=arm-elf-ar\r
31 CRT0=boot.s\r
32 \r
33 #\r
34 # CFLAGS common to both the THUMB and ARM mode builds\r
35 #\r
36 CFLAGS=-Wall -Wextra -D $(RUN_MODE) -D GCC_AT91FR40008 -I. -I../../Source/include \\r
37                 -I../Common/include $(DEBUG) -mcpu=arm7tdmi -T$(LDSCRIPT) \\r
38                 -Wcast-align $(OPTIM) -fomit-frame-pointer -fno-strict-aliasing \\r
39                 -fno-dwarf2-cfi-asm\r
40 \r
41 ifeq ($(USE_THUMB_MODE),YES)\r
42         CFLAGS += -mthumb-interwork -D THUMB_INTERWORK\r
43         THUMB_FLAGS=-mthumb\r
44 endif\r
45 \r
46 \r
47 LINKER_FLAGS=-Xlinker -ortosdemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map\r
48 \r
49 #\r
50 # Source files that can be built to THUMB mode.\r
51 #\r
52 THUMB_SRC = \\r
53 main.c \\r
54 serial/serial.c \\r
55 ParTest/ParTest.c \\r
56 ../Common/Minimal/integer.c \\r
57 ../Common/Minimal/flash.c \\r
58 ../Common/Minimal/PollQ.c \\r
59 ../Common/Minimal/comtest.c \\r
60 ../Common/Minimal/flop.c \\r
61 ../Common/Minimal/semtest.c \\r
62 ../Common/Minimal/dynamic.c \\r
63 ../Common/Minimal/BlockQ.c \\r
64 ../../Source/tasks.c \\r
65 ../../Source/queue.c \\r
66 ../../Source/list.c \\r
67 ../../Source/portable/MemMang/heap_2.c \\r
68 ../../Source/portable/GCC/ARM7_AT91FR40008/port.c\r
69 \r
70 #\r
71 # Source files that must be built to ARM mode.\r
72 #\r
73 ARM_SRC = \\r
74 ../../Source/portable/GCC/ARM7_AT91FR40008/portISR.c \\r
75 serial/serialISR.c\r
76 \r
77 #\r
78 # Define all object files.\r
79 #\r
80 ARM_OBJ = $(ARM_SRC:.c=.o)\r
81 THUMB_OBJ = $(THUMB_SRC:.c=.o)\r
82 \r
83 rtosdemo.hex : rtosdemo.elf\r
84         $(OBJCOPY) rtosdemo.elf -O ihex rtosdemo.hex\r
85 \r
86 rtosdemo.elf : $(ARM_OBJ) $(THUMB_OBJ) $(CRT0) Makefile\r
87         $(CC) $(CFLAGS) $(ARM_OBJ) $(THUMB_OBJ) -nostartfiles $(CRT0) $(LINKER_FLAGS)\r
88 \r
89 $(THUMB_OBJ) : %.o : %.c $(LDSCRIPT) Makefile\r
90         $(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@\r
91 \r
92 $(ARM_OBJ) : %.o : %.c $(LDSCRIPT) Makefile\r
93         $(CC) -c $(CFLAGS) $< -o $@\r
94 \r
95 clean :\r
96         touch Makefile\r
97         rm $(ARM_OBJ)\r
98         rm $(THUMB_OBJ)\r
99 \r