GeorgeZ
GeorgeZ

Reputation: 65

no rules to make target 'micaz'

I am a new in Tinyos.

I am following the tinyos Tutorial lesson 3: Mote-mote radio communication.

When I use 'make' to compile the program BlinkToRadio in lesson 3, I got a error message:

make: *** No rule to make target 'micaz'. Stop.

But when I compile the program Blink, it works. So I dont think its the problem in enviorement variables.

Can anyone help me what it the problem.

Thank you!

Upvotes: 3

Views: 7254

Answers (4)

Mihir
Mihir

Reputation: 1

I got the same errors. There are 2 ways to solve it..... Do not run the code as root. This works for sure. 2nd I am not so sure but if at all you want to run as root, try sudo bash and not other commands. Hope this helps

Upvotes: 0

Rudimar Engel
Rudimar Engel

Reputation: 21

this is a problem in the file Makefile, in the next code:

COMPONENT=BlinkToRadioAppC

include $(MAKERULES)

sometimes there is a space after $, or some other error.

Upvotes: 2

Akshaya Aradhya
Akshaya Aradhya

Reputation: 21

Have you defined MAKERULES?

You can check the definition of MAKERULES this way:

echo $MAKERULES

If not defined, you can define MAKERULES this way:

export MAKERULES=/opt/tinyos-2.1.0/support/make/MAKERULES

Upvotes: 1

Magnus
Magnus

Reputation: 1282

Are you using sudo when you're trying to build the app? sudo will likely reset all your environment variable while you're using sudo. You can set env_keep in the /etc/sudoers file to keep your $MAKERULES

Defaults env_keep += "MAKERULES"

or you could look at this

Of course, it could be something entirely different....

Have you defined a Makefile? The Makefile for lesson 3 should be:

COMPONENT=BlinkToRadioAppC
include $(MAKERULES)

Upvotes: 1

Related Questions