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