]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/Xilinx_FreeRTOS_BSP/repo/bsp/freertos822_xilinx_v1_0/src/Makefile_microblaze
Prepare for V9.0.0 release:
[freertos] / FreeRTOS / Demo / Xilinx_FreeRTOS_BSP / repo / bsp / freertos822_xilinx_v1_0 / src / Makefile_microblaze
1 #\r
2 # Copyright (C) 2012-2013 Xilinx, Inc.\r
3 #\r
4 # This file is part of the port for FreeRTOS made by Xilinx to allow FreeRTOS\r
5 # to operate with Xilinx Zynq devices.\r
6 #\r
7 # This file is free software; you can redistribute it and/or modify it under\r
8 # the terms of the GNU General Public License (version 2) as published by the\r
9 # Free Software Foundation AND MODIFIED BY the FreeRTOS exception\r
10 # (see text further below).\r
11 #\r
12 # This file is distributed in the hope that it will be useful, but\r
13 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\r
14 # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for\r
15 # more details.\r
16 #\r
17 # You should have received a copy of the GNU General Public License; if not it\r
18 # can be viewed here: <http://www.gnu.org/licenses/>\r
19 #\r
20 # The following exception language was found at\r
21 # http://www.freertos.org/a00114.html on May 8, 2012.\r
22 #\r
23 # GNU General Public License Exception\r
24 #\r
25 # Any FreeRTOS source code, whether modified or in its original release form,\r
26 # or whether in whole or in part, can only be distributed by you under the\r
27 # terms of the GNU General Public License plus this exception. An independent\r
28 # module is a module which is not derived from or based on FreeRTOS.\r
29 #\r
30 # EXCEPTION TEXT:\r
31 #\r
32 # Clause 1\r
33 #\r
34 # Linking FreeRTOS statically or dynamically with other modules is making a\r
35 # combined work based on FreeRTOS. Thus, the terms and conditions of the\r
36 # GNU General Public License cover the whole combination.\r
37 #\r
38 # As a special exception, the copyright holder of FreeRTOS gives you permission\r
39 # to link FreeRTOS with independent modules that communicate with FreeRTOS\r
40 # solely through the FreeRTOS API interface, regardless of the license terms\r
41 # of these independent modules, and to copy and distribute the resulting\r
42 # combined work under terms of your choice, provided that\r
43 #\r
44 # Every copy of the combined work is accompanied by a written statement that\r
45 # details to the recipient the version of FreeRTOS used and an offer by\r
46 # yourself to provide the FreeRTOS source code (including any modifications\r
47 # you may have  made) should the recipient request it.\r
48 # The combined work is not itself an RTOS, scheduler, kernel or related product.\r
49 # The independent modules add significant and primary functionality to FreeRTOS\r
50 # and do not merely extend the existing functionality already present\r
51 # in FreeRTOS.\r
52 #\r
53 # Clause 2\r
54 #\r
55 # FreeRTOS may not be used for any competitive or comparative purpose,\r
56 # including the publication of any form of run time or compile time metric,\r
57 # without the express permission of Real Time Engineers Ltd. (this is the norm\r
58 # within the industry and is intended to ensure information accuracy).\r
59 #\r
60 \r
61 #\r
62 # Processor architecture\r
63 # microblaze\r
64 #\r
65 ARCH = microblaze\r
66 \r
67 SYSTEMDIR = ../../..\r
68 \r
69 TOPDIR = .\r
70 \r
71 ARCH_PREFIX = mb\r
72 \r
73 #\r
74 # gnu tools for Makefile\r
75 #\r
76 CC = $(ARCH_PREFIX)-gcc\r
77 AS = $(ARCH_PREFIX)-as\r
78 AR = $(ARCH_PREFIX)-ar\r
79 CP = cp\r
80 \r
81 #\r
82 # Compiler, linker and other options.\r
83 #\r
84 CFLAGS = ${COMPILER_FLAGS} ${EXTRA_COMPILER_FLAGS}\r
85 \r
86 #\r
87 # System project directories.\r
88 #\r
89 LIBDIR = $(SYSTEMDIR)/lib\r
90 INCLUDEDIR = $(SYSTEMDIR)/include\r
91 \r
92 # Kernel library.\r
93 LIBFREERTOS = ${LIBDIR}/libfreertos.a\r
94 LIBXIL = ${LIBDIR}/libxil.a\r
95 \r
96 INCLUDEFILES =  ${TOPDIR}/*.h\r
97 \r
98 INCLUDES = -I$(INCLUDEDIR) \\r
99         -I${TOPDIR}\r
100 \r
101 KERNEL_AR_OBJS = *.c *.S\r
102 \r
103 OUTS = *.o\r
104 \r
105 libs:   $(KERNEL_AR_OBJS)\r
106         $(MAKE) -f Makefile_depends -e "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" -C ../../standalone_v5_0/src libs\r
107         @echo "Compiling FreeRTOS"\r
108         @$(COMPILER) $(COMPILER_FLAGS) $(EXTRA_COMPILER_FLAGS) $(INCLUDES) $^\r
109         @$(ARCHIVER) -r ${LIBFREERTOS} ${OUTS}\r
110         @$(ARCHIVER) -d ${LIBXIL} asm_vectors.o\r
111         @$(ARCHIVER) -s ${LIBXIL}\r
112 \r
113         make clean\r
114 \r
115 \r
116 \r
117 \r
118 include_standalone:\r
119         @echo "includes"\r
120         $(MAKE) -f Makefile_depends -e "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" -C ../../standalone_v5_0/src include\r
121         $(CP) -rf $(INCLUDEFILES) $(INCLUDEDIR)\r
122 \r
123 \r
124 .PHONY: include\r
125 include:\r
126         @echo "include"\r
127         $(MAKE) -f Makefile_depends -e "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" -C ../../standalone_v5_0/src include\r
128         ${CP} ${INCLUDEFILES} ${INCLUDEDIR}\r
129 \r
130 clean:\r
131         rm -rf ${OUTS}\r
132 \r
133 \r
134 \r
135 \r
136 \r
137 #PROCESSOR = microblaze_0\r
138 #LIBRARIES = ${PROCESSOR}/lib/libxil.a\r
139 #BSP_MAKEFILES := $(wildcard $(PROCESSOR)/libsrc/*/src/Makefile)\r
140 #SUBDIRS := $(patsubst %/Makefile, %, $(BSP_MAKEFILES))\r
141 #\r
142 #ifneq (,$(findstring win,$(RDI_PLATFORM)))\r
143 # SHELL = CMD\r
144 #endif\r
145 #\r
146 #all: libs\r
147 #       @echo 'Finished building libraries'\r
148 #\r
149 #include: $(addsuffix /make.include,$(SUBDIRS))\r
150 #\r
151 #libs: $(addsuffix /make.libs,$(SUBDIRS))\r
152 #\r
153 #$(PROCESSOR)/lib/libxil.a: $(PROCESSOR)/lib/libxil_init.a\r
154 #       cp -f $< $@\r
155 #\r
156 #%/make.include: $(if $(wildcard $(PROCESSOR)/lib/libxil_init.a),$(PROCESSOR)/lib/libxil.a,)\r
157 #       @echo "Running Make include in $(subst /make.include,,$@)"\r
158 #       $(MAKE) -C $(subst /make.include,,$@) -s include  "SHELL=$(SHELL)" "COMPILER=mb-gcc" "ARCHIVER=mb-ar" "COMPILER_FLAGS= -O2 -c -mcpu=v9.4 -mhard-float -mlittle-endian #-mno-xl-soft-div -mno-xl-soft-mul -mxl-barrel-shift -mxl-float-convert -mxl-float-sqrt -mxl-multiply-high -mxl-pattern-compare" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections #-fdata-sections"\r
159 #\r
160 #%/make.libs: include\r
161 #       @echo "Running Make libs in $(subst /make.libs,,$@)"\r
162 #       $(MAKE) -C $(subst /make.libs,,$@) -s libs  "SHELL=$(SHELL)" "COMPILER=mb-gcc" "ARCHIVER=mb-ar" "COMPILER_FLAGS= -O2 -c -mcpu=v9.4 -mhard-float -mlittle-endian #-mno-xl-soft-div -mno-xl-soft-mul -mxl-barrel-shift -mxl-float-convert -mxl-float-sqrt -mxl-multiply-high -mxl-pattern-compare" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections #-fdata-sections"\r
163 #\r
164 #clean:\r
165 #       rm -f ${PROCESSOR}/lib/libxil.a\r