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

📄 makefile

📁 DIY自己的MP3的参考价值极高的代码。含有详细的解释
💻
字号:
#
# Makefile for yampp-3
#
# Jesper Hansen 2001-05-22
#


# Tools and directories
CC		= avr-gcc
AS		= avr-gcc -x assembler-with-cpp	
RM		= rm -f
RN		= mv
BIN		= avr-objcopy
INCDIR	= .
LIBDIR	= $(AVR)/avr/lib
SHELL   = $(AVR)/bin/sh.exe
FORMAT  = srec

# library (.a) file creation command
AR= avr-ar rc

# second step in .a creation (use "touch" if not needed)
AR2= avr-ranlib



############################################################################################
############################################################################################
	
# CPU type
MCU = atmega162

# Target
TRG	= yampp7lib

# Library files
LIBSRC  = ata.asm mmc.asm vs1001.asm delay.asm lcd.asm usb.asm

# Assembler flags
ASFLAGS = -DYAMPP7 -Wa,-gstabs,-a=$<.lst


############################################################################################
############################################################################################

#define all project specific object files
	ASFLAGS += -mmcu=$(MCU)
	LIBOBJ = $(LIBSRC:.asm=.o) 

	  
#this defines the aims of the make process
all:	$(TRG).a

#assemble: instructions to create object file from assembler files
%o : %asm
	$(AS) -c $(ASFLAGS) -I$(INCDIR) $< -o $@


$(TRG).a: $(LIBOBJ)
	$(RM) $(TRG).a
	$(AR) $(TRG).a  $(LIBOBJ)
	$(AR2) $(TRG).a
	avr-size $(TRG).a


#make instruction to delete created files
clean:
	$(RM) $(LIBOBJ)
	$(RM) $(TRG).map
	$(RM) $(TRG).elf
	$(RM) $(TRG).obj
	$(RM) $(TRG).eep
	$(RM) $(TRG).rom
	$(RM) *.bak
	$(RM) *.lst
	$(RM) *.?_sym


############################################################################################
############################################################################################

###### dependecies, add any dependencies you need here ###################


base.o		: base.asm base.h makefile	
ata.o		: ata.asm ata.h makefile	
mmc.o		: mmc.asm mmc.h makefile	
usb.o		: usb.asm usb.h makefile	
lcd.o		: lcd.asm lcd.h makefile	
uart.o		: uart.asm uart.h makefile	
vs1001.o	: vs1001.asm vs1001.h makefile	
delay.o		: delay.asm delay.h makefile	

⌨️ 快捷键说明

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