2017-02-14 88 views
-2

您好我有makefile变,有些事情是这样的:
的Makefile变量

NDK  := ~/Application/Android/SDK/NDK 
ARCH := arm 
ifeq ($(ARCH),arm) 
//..etc.. 
endif 

,但是当我尝试makefile我得到这个错误:

: NDK: command not found 
: ARCH: command not found 
: syntax error near unexpected token `$(ARCH),arm' 

我在Ubuntu
那是可变的我知道,但为什么我得到他们的错误?最新错误和如何解决?
我是ubuntu新手!

+1

你是什么意思'我尝试makefile'。你不用'make'吗? – robsn

+0

@robsn不,我不使用'make',在这里你可以看到我的'makefile':'https:// github.com/mtmiller/openconnect/blob/master/android/Makefile' – Mehrdad

+0

你必须使用' make'。你不能自己运行一个makefile。 makefile只是'make'的指令。请看jotik的回答。 – robsn

回答

1

您试图运行./makefile作为可执行文件。但你应该使用make来运行它。例如:

make -f makefile 

或只是

make 

如果你的Makefile正确命名makefileMakefile

如果您确实需要直接执行makefile,请参见this StackOverflow question and answers关于如何将正确的shebang添加到makefile中。

+0

谢谢,你说得对,对不起的问题感谢你的回答 – Mehrdad