Makefiles: Updated for build on BSD
[simavr] / examples / board_i2ctest / Makefile
index 0174370..ec0197b 100644 (file)
@@ -1,5 +1,5 @@
 # 
-#      Copyright 2008-2011 Michel Pollet <buserror@gmail.com>
+#      Copyright 2008-2012 Michel Pollet <buserror@gmail.com>
 #
 #      This file is part of simavr.
 #
 target=        i2ctest
 firm_src = ${wildcard at*${board}.c}
 firmware = ${firm_src:.c=.axf}
-simavr = ../../
-
-SHELL   = /bin/bash
+simavr = ../..
 
 IPATH = .
-IPATH += ../parts
+IPATH += ${simavr}/examples/shared
+IPATH += ${simavr}/examples/parts
 IPATH += ${simavr}/include
 IPATH += ${simavr}/simavr/sim
 
 VPATH = .
-VPATH += ../parts
+VPATH += ${simavr}/examples/shared
+VPATH += ${simavr}/examples/parts
 
 
-all: obj atmega48_${target}.axf ${target} 
+all: obj ${firmware} ${target} 
 
 include ${simavr}/Makefile.common
 
-atmega48_${target}.axf: atmega48_${target}.c
-atmega48_${target}.axf: avr_twi_master.c avr_twi_master.h
+atmega1280_${target}.axf: atmega1280_${target}.c
+atmega1280_${target}.axf: ${simavr}/examples/shared/avr_twi_master.c
+atmega1280_${target}.axf: ${simavr}/examples/shared/avr_twi_master.h
 
 board = ${OBJ}/${target}.elf
 
 ${board} : ${OBJ}/${target}.o
 ${board} : ${OBJ}/i2c_eeprom.o
-${board} : ${simavr}/simavr/${OBJ}/libsimavr.a
 
 ${target}: ${board}
        @echo $@ done