소스 검색

Makefile change for cross compiling. (#3176)

Working from wsl and compiling for windows this change makes it much easier to compile a static library for windows on arm.
To compile a static library for windows on arm:

```
make PLATFORM=PLATFORM_DESKTOP TARGET_OS=WINDOWS CROSS_CC=/llvm/bin/aarch64-w64-mingw32-gcc CROSS_AR=/llvm/bin/aarch64-w64-mingw32-ar
```

This does not work to compile a shared library yet, only static.
pull/3178/head
Michael Anghelone 1 년 전
committed by GitHub
부모
커밋
70286c7cdc
No known key found for this signature in database GPG 키 ID: 4AEE18F83AFDEB23
1개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  1. +11
    -0
      src/Makefile

+ 11
- 0
src/Makefile 파일 보기

@ -308,6 +308,17 @@ ifeq ($(PLATFORM),PLATFORM_ANDROID)
AR = $(ANDROID_TOOLCHAIN)/bin/llvm-ar
endif
# This section is here to help handle cross compilation. eg build on Linux for Windows. If you are doing this, you better know what you are doing!
ifdef TARGET_OS
ifdef CROSS_CC
CC = ${CROSS_CC}
endif
ifdef CROSS_AR
AR = ${CROSS_AR}
endif
PLATFORM_OS = ${TARGET_OS}
endif
# Define compiler flags: CFLAGS
#------------------------------------------------------------------------------------------------
# -O1 defines optimization level

불러오는 중...
취소
저장