blob: 18c2b695de385c0e9009339ca6fb2a8a46cdbd90 (
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
39
40
41
42
|
# This file is part of MXE.
# See index.html for further information.
PKG := portmidi
$(PKG)_IGNORE :=
$(PKG)_VERSION := 217
$(PKG)_CHECKSUM := f45bf4e247c0d7617deacd6a65d23d9fddae6117
$(PKG)_SUBDIR := portmidi
$(PKG)_FILE := $(PKG)-src-$($(PKG)_VERSION).zip
$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/portmedia/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_DEPS := gcc
define $(PKG)_UPDATE
$(WGET) -q -O- "http://sourceforge.net/projects/portmedia/files/portmidi/" | \
grep -i 'portmedia/files/portmidi' | \
$(SED) -n 's,.*portmidi/\([0-9]*\)/.*,\1,p' | \
head -1
endef
define $(PKG)_BUILD
mkdir '$(1)/build'
cd '$(1)/build' && cmake .. \
-DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)'
$(MAKE) -C '$(1)/build' -j '$(JOBS)' portmidi-$(if $(BUILD_STATIC),static,dynamic)
# install library files
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'
$(INSTALL) -m644 '$(1)/build/libportmidi$(if $(BUILD_STATIC),_s).$(LIB_SUFFIX)' \
'$(PREFIX)/$(TARGET)/lib/libportmidi.$(LIB_SUFFIX)'
# install include files
$(INSTALL) -d '$(PREFIX)/$(TARGET)/include'
$(INSTALL) -m644 '$(1)/pm_common/portmidi.h' '$(PREFIX)/$(TARGET)/include/'
$(INSTALL) -m644 '$(1)/pm_common/pmutil.h' '$(PREFIX)/$(TARGET)/include/'
$(INSTALL) -m644 '$(1)/porttime/porttime.h' '$(PREFIX)/$(TARGET)/include/'
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic \
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-portmidi.exe' \
-lportmidi -lwinmm
endef
|