2 # Copyright (C) 2012-2013 Xilinx, Inc.
\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
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
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
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
20 # The following exception language was found at
\r
21 # http://www.freertos.org/a00114.html on May 8, 2012.
\r
23 # GNU General Public License Exception
\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
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
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
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
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
62 # Processor architecture
\r
67 SYSTEMDIR = ../../..
\r
74 # gnu tools for Makefile
\r
76 CC = $(ARCH_PREFIX)-gcc
\r
77 AS = $(ARCH_PREFIX)-as
\r
78 AR = $(ARCH_PREFIX)-ar
\r
82 # Compiler, linker and other options.
\r
84 CFLAGS = ${COMPILER_FLAGS} ${EXTRA_COMPILER_FLAGS}
\r
87 # System project directories.
\r
89 LIBDIR = $(SYSTEMDIR)/lib
\r
90 INCLUDEDIR = $(SYSTEMDIR)/include
\r
93 LIBFREERTOS = ${LIBDIR}/libfreertos.a
\r
94 LIBXIL = ${LIBDIR}/libxil.a
\r
96 INCLUDEFILES = ${TOPDIR}/*.h
\r
98 INCLUDES = -I$(INCLUDEDIR) \
\r
101 KERNEL_AR_OBJS = *.c *.S
\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
118 include_standalone:
\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
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
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
142 #ifneq (,$(findstring win,$(RDI_PLATFORM)))
\r
147 # @echo 'Finished building libraries'
\r
149 #include: $(addsuffix /make.include,$(SUBDIRS))
\r
151 #libs: $(addsuffix /make.libs,$(SUBDIRS))
\r
153 #$(PROCESSOR)/lib/libxil.a: $(PROCESSOR)/lib/libxil_init.a
\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
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
165 # rm -f ${PROCESSOR}/lib/libxil.a
\r