我正在尝试在 friendlyARM qtopia 2.2.0 上编译程序 但我遇到了一些错误,坦率地说,我不知道自己在做什么。
生成文件代码:
IDIR =./
CC=gcc
CFLAGS=-I$(IDIR)
ODIR=obj
LDIR =./
LIBS=-lgd -lrt
_DEPS = main.h Makefile
DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS))
_OBJ = main.o serial.o fb.o menu_main.o timer.o cmdin.o buzzer.o statemachine.o inout.o network.o text_file_input.o text_file_input_oven.o
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
$(ODIR)/%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
main: $(OBJ)
gcc -o $@ $^ $(CFLAGS) $(LIBS)
.PHONY: clean
clean:
rm -f $(ODIR)/*.o *~ core $(INCDIR)/*~
错误代码:
/sdcard/images/makef # Makefile
Makefile: line 1: IDIR: not found
Makefile: line 3: IDIR: not found
Makefile: line 6: LDIR: not found
Makefile: line 8: -lrt: not found
Makefile: line 10: _DEPS: not found
Makefile: line 11: IDIR: not found
Makefile: line 11: _DEPS: not found
Makefile: line 11: patsubst: not found
Makefile: line 11: DEPS: not found
Makefile: line 13: _OBJ: not found
Makefile: line 14: ODIR: not found
Makefile: line 14: _OBJ: not found
Makefile: line 14: patsubst: not found
Makefile: line 14: OBJ: Permission denied
Makefile: line 17: ODIR: not found
Makefile: line 17: DEPS: not found
Makefile: line 17: /%.o:: not found
Makefile: line 18: CC: not found
Makefile: line 18: CFLAGS: not found
Makefile: line 18: can't open : no such file
Makefile: line 18: -c: not found
Makefile: line 20: OBJ: Permission denied
Makefile: line 20: main:: not found
Makefile: line 21: CFLAGS: not found
Makefile: line 21: LIBS: not found
Makefile: line 21: gcc: not found
Makefile: line 23: .PHONY:: not found
Makefile: line 25: clean:: not found
Makefile: line 26: ODIR: not found
Makefile: line 26: INCDIR: not found
最佳答案
您不能执行 Makefile 文件本身。您需要使用 make
命令。
关于c++ - 制作一个关于 qtopia 错误的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23017826/