blob: 990c2baca432ca7aa026da4356a57d0bf61af47a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
include ../../Makefile.include LIBJPEG-TURBO-VERSION ../../download-files.include
PREFIX=$(NATIVEPREFIX)
PLATFORM=$(NATIVEPLATFORM)
DEPS = ../../Makefile.include LIBJPEG-TURBO-VERSION Makefile ../../download-files.include \
01-disable-executables.patch
CMAKE_OPTIONS := -DCMAKE_TOOLCHAIN_FILE= \
-DCMAKE_ASM_NASM_COMPILER:FILEPATH=$(NATIVEPREFIX)/bin/nasm \
-DENABLE_SHARED:BOOL=OFF \
-DWITH_JPEG8:BOOL=ON \
-DCMAKE_C_COMPILER="$(CC_BINARY_FOR_BUILD)" \
-DCMAKE_C_FLAGS="$(NATIVE_CFLAGS)" \
-DCMAKE_EXE_LINKER_FLAGS="$(NATIVE_LDFLAGS)" \
-DCMAKE_INSTALL_LIBDIR:STRING=lib
LIBDYLIB=$(PLATFORM)/build/libjpeg.a
all: .installed-$(PLATFORM)
$(PLATFORM): $(DEPS) | $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE)
rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
cd $(PLATFORM); patch -p1 -i ../01-disable-executables.patch
cd $(PLATFORM); $(CMAKE) -B build $(CMAKE_OPTIONS)
$(LIBDYLIB): $(PLATFORM)
$(MAKE) -C $(PLATFORM)/build
.installed-$(PLATFORM): $(LIBDYLIB)
$(MAKE) -C $(PLATFORM)/build install
touch $@
clean:
$(MAKE) -C $(PLATFORM) clean
rm -f .installed-$(PLATFORM)
distclean::
rm -rf $(PLATFORM) .installed-$(PLATFORM)
|