⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile.mak

📁 altera epxa1的例子程序
💻 MAK
字号:
# Makefile
#
#
# Copyright (c) Altera Corporation 2002.
# All rights reserved.
#
# This is the Makefile for the ads directory of the Multiple Images 
# Reference Design for Excalibur-ARM. Makefile is simple in the hopes
# to easily support both PC and Unix platforms.
#
# Environment Variables
# ---------------------
#
# In order to locate the makeprogfile utility and the boot library,
# QUARTUS_ROOTDIR must be defined. These variables point to the 
# installation directory of Quartus. On Windows these variables are 
# set automatically when the tools are installed. They should be 
# should be set manually on unix.
#
# If there are spaces in the install directory path name you may have
# problems running this make file
#
# In addition it is assumed that the directory that contains the ADS 
# utilities are on you path. 
#
#################################################################
# The tools that will be used to build the application.
CC     = armcc
ASM    = armasm
LINK   = armlink
ELF    = fromelf
PROG   = makeprogfile
# Flags passed to tools at runtime 
LFLAGS = -entry 0 -ro 0 -first bootloader.o"(bootloader)" -list $(DIR)/output.lst -symbols -map -scatter $(HELLO_SCR)/scatter.link
EFLAGS = -i32
CFLAGS = -g -c -O0
AFLAGS = -g -keep
# Paths to locate source files
VPATH = $(HELLO_SCR) $(SCR)/include  ../common/software $(HARDWARE_DIR)
# Project paths
# Directory for compliation results
DIR    = $(HELLO_SCR)/debug
# Common software source files for both ADS and GNU tool chain
SCR    = ../common/software
# ADS specific software source
HELLO_SCR = ./hello_world
# Include directories
INCLUDE_PATH = -I $(SCR)/include -I $(HARDWARE_DIR)
# Directory where hardware for the default image resides.  
HARDWARE_DIR = ../common/hardware/hello_world




hello_flash.hex: $(DIR)/hello.elf
	$(ELF) $(EFLAGS) -o hello_flash.hex $(DIR)/hello.elf
	$(ELF) -text/c -output $(DIR)/hello_flash.dis $(DIR)/hello.elf
	
		
$(DIR)/bootloader.o: bootloader.s stripe.s  
	$(ASM) $(AFLAGS) $(INCLUDE_PATH) -o $(DIR)/bootloader.o $(HELLO_SCR)/bootloader.s

$(DIR)/init.o: init.s stripe.s  
	$(ASM) $(AFLAGS) $(INCLUDE_PATH) -o $(DIR)/init.o $(SCR)/init.s

$(DIR)/hello_world.o: hello_world.c stripe.h  uartcomm.h  uartcomm.c
	$(CC) $(CFLAGS) $(INCLUDE_PATH) -o $(DIR)/hello_world.o $(HELLO_SCR)/hello_world.c


$(DIR)/irq.o: irq.c stripe.h  uartcomm.h  uartcomm.c int_ctrl00.h
	$(CC) $(CFLAGS) $(INCLUDE_PATH) -o $(DIR)/irq.o $(SCR)/irq.c

$(DIR)/uartcomm.o: uartcomm.c stripe.h  uartcomm.h  int_ctrl00.h uart00.h
	$(CC) $(CFLAGS) $(INCLUDE_PATH) -o $(DIR)/uartcomm.o $(SCR)/uartcomm.c
		
$(DIR)/retarget.o: retarget.c 
	$(CC) $(CFLAGS) $(INCLUDE_PATH) -o $(DIR)/retarget.o $(SCR)/retarget.c

	
$(DIR)/hello.elf: $(DIR)/bootloader.o $(DIR)/hello_world.o $(DIR)/irq.o $(DIR)/retarget.o $(DIR)/uartcomm.o $(DIR)/init.o $(HELLO_SCR)/scatter.link
	$(LINK) $(LFLAGS) -o $(DIR)/hello.elf \
	$(DIR)/bootloader.o \
	$(DIR)/hello_world.o \
	$(DIR)/init.o \
	$(DIR)/irq.o \
	$(DIR)/retarget.o \
	$(DIR)/uartcomm.o 

clean:
	rm $(DIR)/*.o


	


	



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -