summaryrefslogtreecommitdiff
path: root/n/avr/rs232/Makefile
diff options
context:
space:
mode:
authorschodet2004-07-06 21:09:13 +0000
committerschodet2004-07-06 21:09:13 +0000
commit0c19b9edaa65f71f79a651302379fde883b76602 (patch)
tree79b4367ecf80e2ccbfb0f064ec5895d9043f0a5d /n/avr/rs232/Makefile
parent6a37da0027ac312365eff5f63596bf35db6c5fa5 (diff)
Ajout du support des modules.
Diffstat (limited to 'n/avr/rs232/Makefile')
-rw-r--r--n/avr/rs232/Makefile77
1 files changed, 4 insertions, 73 deletions
diff --git a/n/avr/rs232/Makefile b/n/avr/rs232/Makefile
index 1c08c0b..a44cfdf 100644
--- a/n/avr/rs232/Makefile
+++ b/n/avr/rs232/Makefile
@@ -1,7 +1,8 @@
-PRG = test_rs232
-OBJECTS = test_rs232.o rs232.o
+PROGS = test_rs232
+SOURCES = test_rs232.c rs232.c
DOC = rs232.html
EXTRACTDOC = rs232.c avrconfig.h
+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