LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-20-2013, 05:38 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
make: *** No rule to make target `da.o', needed by `da.bin'. Stop.


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?
 
Old 09-21-2013, 01:24 PM   #2
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,786

Rep: Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083
Is it possible you are missing da.c? You can print some debugging statements by passing -d to make, but be prepared to comb through a lot of output. Adding -r (--no-builtin-rules) will reduce output slightly.
 
Old 09-21-2013, 01:54 PM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Yes, that is what happened. I had renamed da.c and then I forgot! Thanks anyways.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] make: *** No rule to make target `main.c', needed by `main.o'. Stop. renjith007 Linux - Newbie 3 02-07-2012 01:08 AM
Error in Makefile:No rule to make target `g++',needed by... stop karthik.c Programming 5 03-09-2009 12:55 AM
Help needed for make file problem : make: *** No rule to make target `flash', needed rameshsatyavaram Linux - Newbie 3 09-11-2008 02:13 AM
Belkin Wirless G RTL8185L make[1]: *** No rule to make target `Makefile'. Stop. SilverRock Linux - Wireless Networking 2 02-11-2007 07:25 AM
No rule to make target `/mkspecs/default/qmake.conf', needed by `Makefile'. Stop Julianus Linux - General 0 12-21-2003 07:17 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration