OpenWrt Forum Archive

Topic: Compiling one-off programs

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

I have a simple bit of C code that I built and tested on my linux box.  Now I want to build it for my openwrt box.

Is there some quick and simple way to compile a program without having to create a makefile and all that?

All I need is the equivalent of

gcc myprog.c -lsqlite3 -lm -o myprog

Any suggestions?

Sure

STAGING_DIR=./staging_dir/target-xyz ./staging_dir/toolchain-xyz/bin/xyz-gcc -o foo foo.c

The discussion might have continued from here.