2

I've never tried to do this before so this is actually my first time to cross compile a C program.

I have a main.c code file and need to create a makefile for it so i can cross compile this file. This c file has a dependancy curl library. When I compile it in xcode by adding a library, it builds fine. However,i still need to create a makefile for the cross compiling. Can I generate that makefile with xcode? If so, can you please provide some step to step guidance or do i need to use another tool to generate it?

vaj oja
  • 1,151
  • 2
  • 16
  • 47
  • 1
    This might help: http://stackoverflow.com/questions/21617017/how-can-i-build-a-makefile-project-with-xcode-5 – IsakBosman Aug 30 '14 at 11:15

1 Answers1

3

Alternative approach

You can use CMake for this task. First of all take a look at this tutorial, that explains CMake basics. Then take a look at toolchain documentation.

Take a look at this post too.

Btw OpenWrt has also support for CMake based projects, just look at uci and libubox packages.

Community
  • 1
  • 1
yegorich
  • 4,653
  • 3
  • 31
  • 37