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

📄 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 $(SCR)/scatter.link
EFLAGS = -i32
CFLAGS = -g -c -O0
AFLAGS = -g -keep
# Paths to locate source files
VPATH = $(SCR) $(SCR)/include  ../common/software $(HARDWARE_DIR)
# Project paths
# Directory for compliation results
DIR    = debug
# ADS specific software source
SCR = ./software
# Include directories
INCLUDE_PATH = -I $(SCR)/include -I $(HARDWARE_DIR)
# Directory where hardware for the default image resides.  
HARDWARE_DIR = .




alu_demo_flash.hex: $(DIR)/alu_demo.elf
	$(ELF) $(EFLAGS)  -o alu_demo_flash.hex $(DIR)/alu_demo.elf  
	$(ELF) -text/c -output $(DIR)/alu_demo.dis $(DIR)/alu_demo.elf
	
		
$(DIR)/bootloader.o: $(HARDWARE_DIR)/Simple_Excalibur_System.sbi bootloader.s stripe.s  
	$(ASM) $(AFLAGS) $(INCLUDE_PATH) -o $(DIR)/bootloader.o $(SCR)/bootloader.s

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

$(DIR)/main.o: main.c stripe.h  uartcomm.h  uartcomm.c
	$(CC) $(CFLAGS) $(INCLUDE_PATH) -o $(DIR)/main.o $(SCR)/main.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)/flash.o: flash.h flash.c
	$(CC) $(CFLAGS) $(INCLUDE_PATH) -o $(DIR)/flash.o $(SCR)/flash.c
		
$(DIR)/retarget.o: retarget.c 
	$(CC) $(CFLAGS) $(INCLUDE_PATH) -o $(DIR)/retarget.o $(SCR)/retarget.c



	
$(DIR)/alu_demo.elf: $(DIR)/flash.o $(DIR)/bootloader.o $(DIR)/main.o $(DIR)/irq.o $(DIR)/retarget.o $(DIR)/uartcomm.o $(DIR)/init.o $(SCR)/scatter.link
	$(LINK) $(LFLAGS) -o $(DIR)/alu_demo.elf \
	$(DIR)/bootloader.o \
	$(DIR)/main.o \
	$(DIR)/init.o \
	$(DIR)/irq.o \
	$(DIR)/retarget.o \
	$(DIR)/uartcomm.o \
	$(DIR)/flash.o

clean:
	rm $(DIR)/*.o


	


	



⌨️ 快捷键说明

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