mirror of https://git.wownero.com/dsc/mxe.git
New page
parent
ed34bf0053
commit
28d832afa7
|
@ -0,0 +1,37 @@
|
|||
A sample package recipe is the following:
|
||||
|
||||
```make
|
||||
# mxe/src/samplepackage.mk
|
||||
# This file is part of MXE.
|
||||
# See index.html for further information.
|
||||
|
||||
PKG := samplepackage
|
||||
$(PKG)_IGNORE :=
|
||||
$(PKG)_VERSION := 0.1.0
|
||||
$(PKG)_CHECKSUM := da39a3ee5e6b4b0d3255bfef95601890afd80709
|
||||
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
|
||||
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
|
||||
$(PKG)_URL := http://$(PKG).github.io/$(PKG)-$($(PKG)_VERSION).tar.gz
|
||||
$(PKG)_DEPS := gcc
|
||||
|
||||
define $(PKG)_UPDATE
|
||||
$(WGET) -q -O- 'http://samplepackage.github.io/' | \
|
||||
$(SED) -n 's,.*/\([0-9][^"]*\)/"\.tar.*,\1,p' | \
|
||||
sort | uniq | \
|
||||
head -1
|
||||
endef
|
||||
|
||||
define $(PKG)_BUILD
|
||||
cd '$(1)' && ./configure \
|
||||
--host='$(TARGET)' \
|
||||
--disable-shared \
|
||||
--prefix='$(PREFIX)/$(TARGET)' \
|
||||
--special-target-string='@special-target@'
|
||||
$(MAKE) -C '$(1)' -j '$(JOBS)'
|
||||
$(MAKE) -C '$(1)' -j 1 install
|
||||
endef
|
||||
|
||||
$(PKG)_BUILD_i686-pc-mingw32 = $(subst @special-target@, x86-win32-gcc, $($(PKG)_BUILD))
|
||||
$(PKG)_BUILD_i686-w64-mingw32 = $(subst @special-target@, x86-win32-gcc, $($(PKG)_BUILD))
|
||||
$(PKG)_BUILD_x86_64-w64-mingw32 = $(subst @special-target@, x86_64-win64-gcc, $($(PKG)_BUILD))
|
||||
```
|
Loading…
Reference in New Issue