OpenWrt Forum Archive

Topic: How to make a package or the binary of an application

The content of this topic has been archived on 3 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

after reading a lot of information in the Forum and Wiki's pages, I still don't know exactly how to cross-compile an application. I have to export an application to OpenWRT and the problems I have are the followings:
- Application must runs in a 2.6.x kernel version, so I only can use Kamikaze branch.
- The steps to install the applications are:
   1.- Execute autogen.sh script, which executes autoreconf and prepare de config files
   2.- Execute ./configure, which checks all the dependencies and creates some files
   3.- Execute make, this compiles the sources and generetaes 3 binaries files

My problem is, how to especify in the Makefile these steps.

Any idea?

Thanks,
Jordi

nobody? sad

Thanks Jaime, this is very useful smile
But now I need something similar about compile complicated programs, not just a simple C program.
Do you know another page? English or spanish page, it doesn't matter (I guess you are spanish cause your name)

Thanks

kirihsk wrote:

Thanks Jaime, this is very useful smile
But now I need something similar about compile complicated programs, not just a simple C program.
Do you know another page? English or spanish page, it doesn't matter.

Thanks

Hi Jordi.

Unfortunately, I'm not much of a c programmer (I only know a little), so I can't help you. I can, however, give you some references to information about "make", but I haven't read all of these books myself (yet!):

a) "Managing Projects with GNU make, 3rd Edition" is available (under the "GNU free documentation license") from here:
http://oreilly.com/catalog/make3/book/index.csp

b) the "Gnu Make Manual" is also available (under the "GNU free documentation license") from here:
http://www.gnu.org/software/make/manual/make.html

c) "Introduction to Makefiles and Autotools" is available (under the "Creative Commons Attribution-ShareAlike License Belgium") from here:
http://eikke.com/articlefiles/writing-m … tools.html

d) If you need more information about the autotools (gnu autoconf, automake and libtool), then you'll probably also need the "goat" book, which is available (under the "Open Publications License") from here:
http://sources.redhat.com/autobook/

I realize that there is a _lot_ of information here, but I prefer to have too much rather than too litttle!

I hope this helps.

kirihsk wrote:

(I guess you are spanish cause your name)

No, soy ingles (de Londres), pero mis padres me han dado un nombre espanol. Puedo entender el espanol un poco, pero no mucho. Es de Catalunya?

(Nope, I'm English (from London), but my parents gave me a Spanish name. I can understand a little Spanish, but not much. Are you from Catalonia?)

jaime :-)

Hi smile

Wel, I will read these links but I think the Makefile for compile a OpenWRT package is not a normal Makefile. Anyway, thanks again smile.

Y si, soy de Catalunya. De barcelona exactamente, aunque viviendo ahora mismo en Helsinki.

Yes, Im from Catalonia. From Barcelona, but living in Helsinki nowadays.

Thank you!

The OpenWRT packaging system uses a bunch of make templates to provide a quasi object-oriented build system. The best reference is the OpenWRT manual: http://downloads.openwrt.org/kamikaze/docs/openwrt.html It describes a lot of the top-level defines and macros. After reading that you should look at how other packages work.

--Dan

The discussion might have continued from here.