summaryrefslogtreecommitdiff
path: root/n/avr/howto/Makefile
diff options
context:
space:
mode:
authorschodet2004-07-06 21:49:45 +0000
committerschodet2004-07-06 21:49:45 +0000
commit87fcba66a1485ca47dd655895868084ae36cc12d (patch)
tree60444f714673acf73f60d48d3f3722ac81dc4126 /n/avr/howto/Makefile
parenta8e3a82889de811232cb8f6f780cc655aab0b51c (diff)
Support des modules.
Diffstat (limited to 'n/avr/howto/Makefile')
-rw-r--r--n/avr/howto/Makefile77
1 files changed, 4 insertions, 73 deletions
diff --git a/n/avr/howto/Makefile b/n/avr/howto/Makefile
index b4478ff..2ac6571 100644
--- a/n/avr/howto/Makefile
+++ b/n/avr/howto/Makefile
@@ -1,7 +1,8 @@
-PRG = example
-OBJECTS = example.o
+PROGS = example
+SOURCES = example.c
DOC = howto-avr.html
EXTRACTDOC =
+MODULES =
# atmega8, atmega8535, atmega128...
MCU_TARGET = atmega8
# -O2 : speed
@@ -11,74 +12,4 @@ OPTIMIZE = -O2
DEFS =
LIBS =
-# You should not have to change anything below here.
-
-CC = avr-gcc
-
-CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET)
-CPPFLAGS = $(DEFS)
-LDFLAGS = -Wl,-Map,$(PRG).map
-
-OBJCOPY = avr-objcopy
-OBJDUMP = avr-objdump
-
-all: elf lst hex
-
-elf: $(PRG).elf
-lst: $(PRG).lst
-
-$(PRG).elf: $(OBJECTS)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
-
-%.lst: %.elf
- $(OBJDUMP) -h -S $< > $@
-
-clean:
- rm -f *.o $(PRG).elf *.bak $(DOC) *.exd
- rm -f *.lst *.map $(EXTRA_CLEAN_FILES)
- rm -f $(PRG).hex $(PRG).bin $(PRG).srec $(PRG)_eeprom.hex $(PRG)_eeprom.bin $(PRG)_eeprom.srec
-
-# Rules for building the doc.
-
-doc: $(DOC)
-
-%.html: %.txt %.exd
- aft $<
-
-%.exd: $(EXTRACTDOC)
- test -n "$^" && extractdoc $^ > $@ || true
-
-# Rules for building the .text rom images.
-
-text: hex bin srec
-
-hex: $(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 $< $@
-
+include Makefile.avr