Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile: Added the ability to cross-compile #89

Open
wants to merge 1 commit into
base: stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ REVISION = 7
LIB = libcli.so
LIB_STATIC = libcli.a

CC = gcc
CC = $(CROSS_COMPILE)gcc
AR = ar
ARFLAGS = rcs
DEBUG = -g
Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,20 @@ To compile:

```sh
$ make
$ make install
```

To cross-compile specify a triplet in variable `CROSS_COMPILE`:

```sh
$ CROSS_COMPILE=machine-vendor-operatingsystem- make
````

To install:

```sh
$ make install
````

Note - as of version 1.10.5 you have a compile time decision on using select()
or poll() in cli_loop(). The default is to use the legacy 'select()' call.
If built with 'CFLAGS=-DLIBCLI_USE_POLL make' then the poll() system call will
Expand Down