Commit 5f2fe2466b5a69ca24dee3a3ca99742f412bf8fc
authorMichel Pollet <buserror@gmail.com>
Mon, 14 Dec 2009 20:54:27 +0000 (20:54 +0000)
committerMichel Pollet <buserror@gmail.com>
Mon, 14 Dec 2009 20:54:27 +0000 (20:54 +0000)
General cleanup, updated comments

Signed-off-by: Michel Pollet <buserror@gmail.com>
3 files changed:
Makefile.common
simavr/Makefile
tests/Makefile

index 77b1ad3fe6c76cfec61c66815b8790157b9c2e29..0949fb8f211f2793c3ed0a81a91b8d644e8a8e09 100644 (file)
@@ -40,26 +40,32 @@ AVR_INC := ${AVR_ROOT}
 AVR := avr-
 endif
 
+# The code is compiled "optimized" to the max.
+# 
+# The wierd "-Wl,--undefined=_mmcu,--section-start=.mmcu=0x910000"
+# is used to tell the linker not to discard the .mmcu section,
+# otherwise the --gc-sections will delete it.
+
 %.hex: %.axf
-               @${AVR}objcopy -j .text -j .data -O ihex ${<} ${@}
+       @${AVR}objcopy -j .text -j .data -O ihex ${<} ${@}
 
 %.s: %.axf
-               @${AVR}objdump -j .text -j .data -j .bss -d  ${<} > ${@}
+       @${AVR}objdump -j .text -j .data -j .bss -d  ${<} > ${@}
 
-# --mcall-prologues 
+# --mcall-prologues can be used here, but messes up debugging a little
 %.axf: %.c 
-               @echo AVR-CC ${<}
-               @part=${<} ; part=$${part/_*}; \
-               ${AVR}gcc -Wall -gdwarf-2 -Os -std=gnu99 \
-                               -mmcu=$$part \
-                               -DF_CPU=8000000 \
-                               -fno-inline-small-functions \
-                               -ffunction-sections -fdata-sections \
-                               -Wl,--relax,--gc-sections \
-                               -Wl,--undefined=_mmcu,--section-start=.mmcu=0x910000 \
-                               -I../include -I../../include \
-                               ${<} -o ${@}
-               @${AVR}size ${@}|sed '1d'
+       @echo AVR-CC ${<}
+       @part=${<} ; part=$${part/_*}; \
+       ${AVR}gcc -Wall -gdwarf-2 -Os -std=gnu99 \
+                       -mmcu=$$part \
+                       -DF_CPU=8000000 \
+                       -fno-inline-small-functions \
+                       -ffunction-sections -fdata-sections \
+                       -Wl,--relax,--gc-sections \
+                       -Wl,--undefined=_mmcu,--section-start=.mmcu=0x910000 \
+                       -I../include -I../../include \
+                       ${<} -o ${@}
+       @${AVR}size ${@}|sed '1d'
 
 OBJ = obj
 
@@ -69,7 +75,7 @@ ${OBJ}/%.o: %.c
        @echo CC $<
 
 ${OBJ}: 
-       mkdir -p ${OBJ}
+       @mkdir -p ${OBJ}
 
 # include the dependency files generated by gcc, if any
 -include ${wildcard ${OBJ}/*.d}
index ab80a9049be0407e34b4cd91c700d53063d8061e..713fd76f2bced59725941850f2e984ad14fda11a 100644 (file)
@@ -25,16 +25,15 @@ cores_o = ${patsubst cores/%.c, obj/%.o, ${cores}}
 sim            = ${wildcard sim/sim_*.c} ${wildcard sim/avr_*.c}
 sim_o  = ${patsubst sim/%.c, obj/%.o, ${sim}}
 
-VPATH  = .
-VPATH  += cores
+VPATH  = cores
 VPATH  += sim
 
-IPATH  = .
-IPATH  += sim
+IPATH  = sim
 IPATH  += ../../shared
 IPATH  += ../include
-IPATH  += /opt/local/include
 
+# Thats for MacPorts libelf
+IPATH  += /opt/local/include
 LFLAGS = -L/opt/local/lib/
 
 all:   obj libsimavr.a ${target}
index 900ad7534c945abe3be56eb73f8271213d0c5070..68db33c6debefdf1dd460acead668848faf01136 100644 (file)
@@ -3,11 +3,6 @@
 # And compile it into an ELF binary.
 # It also disassemble it for debugging purposes.
 # 
-# The code is compiled "optimized" to the max.
-# 
-# The wierd "-Wl,--undefined=_mmcu,--section-start=.mmcu=0x910000"
-# is used to tell the linker not to discard the .mmcu section,
-# otherwise the --gc-sections will delete it.
 # 
 #      Copyright 2008, 2009 Michel Pollet <buserror@gmail.com>
 #