0

This is my make file

EXE     = signsrch
CFLAGS  += -s -O2
PREFIX  = /usr/local
BINDIR  = $(PREFIX)/bin
SRC     = $(EXE).c

all:
    $(CC) $(CFLAGS) -c disasm.c
    $(CC) $(CFLAGS) -c asmserv.c
    $(CC) $(SRC) $(CFLAGS) -o $(EXE) *.o

install:
    install -m 755 -d $(BINDIR)
    install -m 755 $(EXE) $(BINDIR)/$(EXE)

.PHONY:
    install

I want to cross compile it for my ubuntu and I tried:

make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-

but I get unknown type name errors with a bunch of âDWORDâ

Help?

1
  • What are the exact error messages? Do you have a cross-compiler toolchain installed? Commented Nov 6, 2012 at 20:40

2 Answers 2

1

We also need to see some code, but....

Windows has its own types for basic things above the vanilla C ones, as does Linux. It sounds like DWORD as a type is not known in Linux (likely). You'll probably have to create a mytypes.h file that redefines Windows standards like DWORD into Linux speak when building for a Linux platform. Linux has types.h that defines things like int32_t which is the equivalent. See this thread for more about this.

I've assumed you have a working cross compiler set up and you're fighting just with the port. If you haven't, that's your first job. You could have a windows based compiler that targets Linux (the cygwin option, mentioned in another post) or go for a Linux based compiler and targetting windows (crosstool will help here). Though since you seem to be targetting arm, I'm expecting that that Ubuntu install isn't the place you wish to build! :-)

Sign up to request clarification or add additional context in comments.

Comments

1

to cross compile you need a toolchain for the target platform, not just a Makefile. Check this tutorial and also Cygwin

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.