Building FlightGear - Cross Compiling: Difference between revisions

Jump to navigation Jump to search
→‎*.MK file: add *.mk template
(→‎*.MK file: add *.mk template)
Line 118: Line 118:
a file in the src/ directory will be invoked that matches the name of the package followed by a suffix of ".mk", this ".mk" file does the necessary configuration and Makefile generation of software.
a file in the src/ directory will be invoked that matches the name of the package followed by a suffix of ".mk", this ".mk" file does the necessary configuration and Makefile generation of software.


=== *.MK file ===
=== *.MK file template ===


'''TO DO'''
a CMake-based template would look like this.
 
<syntaxhighlight lang="make">
# This file is part of MXE.
# See index.html for further information.
 
PKG            := foo
$(PKG)_IGNORE  :=
$(PKG)_VERSION  := 9000
$(PKG)_CHECKSUM := 5c666531f7d487075fd692d89f1e05036306192a
$(PKG)_SUBDIR  := foo-$($(PKG)_VERSION)
$(PKG)_FILE    := foo-$($(PKG)_VERSION).tar.gz
$(PKG)_URL      := http://www.foo.org/downloads/developer_releases/$($(PKG)_FILE)
$(PKG)_DEPS    := gcc bar baz
 
define $(PKG)_UPDATE
    echo 'TODO: write update script for $(PKG).' >&2;
    echo $($(PKG)_VERSION)
endef
 
define $(PKG)_BUILD
    mkdir '$(1).build'
 
    cd '$(1).build' && cmake '$(1)' \
        -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \
        -DENABLE_QUX=ON
 
    $(MAKE) -C '$(1).build' -j '$(JOBS)' install VERBOSE=1
endef
</syntaxhighlight>


{{Main article|http://mxe.cc/#creating-packages Creating mxe packages}}
{{Main article|http://mxe.cc/#creating-packages Creating mxe packages}}
272

edits

Navigation menu