I understand the basic concept of using a cross compiler to compile code on one architecture and then copying the executable to another architecture to run it. But I can't figure out the last step of the typical
./configure; make; make install sequence in the context of cross compiling.
For example, I want to cross-compile libusb for an ARM device using my Ubuntu PC. I downloaded the libusb source code, ran configure and make:
> ./configure --disable-udev --host=arm-linux-gnueabihf CC=/usr/bin/arm-linux-gnueabi-gcc > make
At this point, I have a bunch of libusb compiled binaries for the ARM architecture. Ideally, I want to copy those binaries over to the ARM device and run
make install so that I don't have to manually copy them into their destination directories. But that would mean I'd have to copy over the entire build environment from the Ubuntu computer, which seems like a waste of time and disk space. Or I could gather just the binaries and the appropriate Makefiles and copy them over, but that seems clunky.
Is there a more elegant way to take advantage of
make install on the destination architecture?