PDA

View Full Version : make a file on qtopia errors



mmkevin
11th April 2014, 18:00
Im trying to compile a program on a friendlyARM qtopia 2.2.0 but i getting some errors and quite frankly i don't know what i'm doing

Makefile code:

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)/*~

error codes:

/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

when i use "make -f Makefile" i get this error "bin/sh: make: not found" there is a "sh" file in the bin folder but it look like i need to install some more stuff, any markers on this ?

ChrisW67
11th April 2014, 21:28
The first bunch of errors are because you tried to run a Makefile as if it were a shell script. The shell tried to run each line... Most of them make no sense as a shell command.

The second error is because you do not have make installed.

mmkevin
12th April 2014, 21:48
ChrisW67 how can I install make?

ChrisW67
13th April 2014, 04:23
It is part of whatever development (or cross-development) environment you install to build applications for your embedded system. I am not familiar with that system. It looks like they provide a cross-compiling GCC version that you use with your host Linux system's make. Install your host system make using your host system's packaging system.