makefile

来自「The program for BOSH 1.5.4」· 代码 · 共 72 行

TXT
72
字号
PRG            = xariasOBJ            = xarias.o hd44780.o lcd.o MCU_TARGET     = atmega32OPTIMIZE       = -OsDEFS           =LIBS           =# You should not have to change anything below here.CC             = avr-gccCFLAGS        = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS)LDFLAGS       = -Wl,-Map,$(PRG).map -L /usr/lib/binutils/avr/2.16.1/ OBJCOPY        = avr-objcopyOBJDUMP        = avr-objdumpall: $(PRG).elf lst text#all: $(PRG).elf lst text eeprom$(PRG).elf: $(OBJ)	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)clean:	rm -rf *.o $(PRG).elf *.eps *.png *.pdf *.bak	rm -rf *.lst *.map $(EXTRA_CLEAN_FILES)lst:  $(PRG).lst%.lst: %.elf	$(OBJDUMP) -h -S $< > $@# Rules for building the .text rom imagestext: hex #text: hex bin srechex:  $(PRG).hex#bin:  $(PRG).bin#srec: $(PRG).srec%.hex: %.elf	$(OBJCOPY) -j .text -j .data -O ihex $< $@#%.srec: %.elf#	$(OBJCOPY) -j .text -j .data -O srec $< $@#%.bin: %.elf#	$(OBJCOPY) -j .text -j .data -O binary $< $@# Rules for building the .eeprom rom images#eeprom: ehex ebin esrec#ehex:  $(PRG)_eeprom.hex#ebin:  $(PRG)_eeprom.bin#esrec: $(PRG)_eeprom.srec#%_eeprom.hex: %.elf#	$(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O ihex $< $@#%_eeprom.srec: %.elf#	$(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O srec $< $@##%_eeprom.bin: %.elf#	$(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O binary $< $@# Every thing below here is used by avr-libc's build system and can be ignored# by the casual user.

⌨️ 快捷键说明

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