Hi:
I have the following makefile:
Code:
semoi@server:/almacen/circuitcellar/2008-abr/nuevo/tmp$ cat Makefile
TARGET = attiny45
WRITER = usbasp
COMPILE = avr-gcc -Wall -O2 -Iusbdrv -I. -mmcu=attiny45 # -DDEBUG_LEVEL=2
OBJECTS = usbdrv.o usbdrvasm.o da.o
all: da.hex
.c.o:
$(COMPILE) -c $< -o $@
.S.o:
$(COMPILE) -x assembler-with-cpp -c $< -o $@
.c.s:
$(COMPILE) -S $< -o $@
clean:
rm -f da.hex da.lst da.obj da.cof da.list da.map da.eep.hex da.bin *.o da.s *.o
da.bin: $(OBJECTS)
$(COMPILE) -o da.bin $(OBJECTS) -Wl,-Map,da.map
da.hex: da.bin
rm -f da.hex da.eep.hex
avr-objcopy -j .text -j .data -O ihex da.bin da.hex
cpp:
$(COMPILE) -E da.c
# Fuse low byte:default 0x62
# 0xef = 1 1 1 0 1 1 1 1
# ^ ^ \ / \--+--/
# | | | +------- CKSEL 3..0 (external >8M crystal)
# | | +--------------- SUT 1..0 (crystal osc, BOD enabled)
# | +------------------ CKOUT
# +-------------------- CKDIV8
#Fuse high byte:default 0xdf
#0x5f= 0 1 0 1 1 1 1 1
semoi@server:/almacen/circuitcellar/2008-abr/nuevo/tmp$
Under a certain suite of programs it runs without problems (in Windows). I've downloaded the avr-gcc, avr-libutils and avr-libc slackbuilds, trying to run make in linux. Here's the output:
Code:
semoi@server:/almacen/circuitcellar/2008-abr/nuevo/tmp$ make
make: *** No rule to make target `da.o', needed by `da.bin'. Stop.
semoi@server:/almacen/circuitcellar/2008-abr/nuevo/tmp$
Now, the rules .c.o and .S.o certain should output da.o. What is the problem then with the Makefile?