summaryrefslogtreecommitdiff
path: root/n/avr/rs232/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'n/avr/rs232/Makefile')
-rw-r--r--n/avr/rs232/Makefile17
1 files changed, 12 insertions, 5 deletions
diff --git a/n/avr/rs232/Makefile b/n/avr/rs232/Makefile
index 8aec9f8..3b0ea0f 100644
--- a/n/avr/rs232/Makefile
+++ b/n/avr/rs232/Makefile
@@ -1,7 +1,10 @@
PRG = test_rs232
-OBJ = test_rs232.o rs232.o
+OBJECTS = test_rs232.o rs232.o
+DOC = rs232.html
# atmega8, atmega8535, atmega128...
MCU_TARGET = atmega8
+# -O2 : speed
+# -Os : size
OPTIMIZE = -O2
DEFS =
@@ -11,7 +14,8 @@ LIBS =
CC = avr-gcc
-CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS)
+CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET)
+CPPFLAGS = $(DEFS)
LDFLAGS = -Wl,-Map,$(PRG).map
OBJCOPY = avr-objcopy
@@ -22,20 +26,23 @@ all: elf lst hex
elf: $(PRG).elf
lst: $(PRG).lst
-$(PRG).elf: $(OBJ)
+$(PRG).elf: $(OBJECTS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
%.lst: %.elf
$(OBJDUMP) -h -S $< > $@
clean:
- rm -f *.o $(PRG).elf *.bak
+ rm -f *.o $(PRG).elf *.bak $(DOC)
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: $(DOC)
+
+%.html: %.txt
+ aft $<
# Rules for building the .text rom images.