diff options
Diffstat (limited to 'src/pe-parse.mk')
-rw-r--r-- | src/pe-parse.mk | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/pe-parse.mk b/src/pe-parse.mk new file mode 100644 index 0000000..2257e29 --- /dev/null +++ b/src/pe-parse.mk @@ -0,0 +1,29 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := pe-parse +$(PKG)_WEBSITE := https://github.com/trailofbits/pe-parse +$(PKG)_DESCR := Principled, lightweight C/C++ PE parser +$(PKG)_IGNORE := +$(PKG)_VERSION := 752f526 +$(PKG)_CHECKSUM := 0a8733fa5bb7e4a077237c869c55b3e5d185f93c7c7d48664f2ebeead1091b47 +$(PKG)_GH_CONF := trailofbits/pe-parse/branches/master +$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) +$(PKG)_DEPS := cc + +# unpack in pe-util for native and cross build +$(PKG)_DEPS_$(BUILD) := +$(PKG)_BUILD_$(BUILD) := + +define $(PKG)_BUILD + # build and install the cross-library + cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \ + -DBUILD_EXAMPLES=OFF + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install + + # test cmake find_package() example + mkdir '$(BUILD_DIR).cmake' + cd '$(BUILD_DIR).cmake' && $(TARGET)-cmake '$(SOURCE_DIR)/examples/peaddrconv' + $(MAKE) -C '$(BUILD_DIR).cmake' -j '$(JOBS)' + $(INSTALL) -m755 '$(BUILD_DIR).cmake/peaddrconv.exe' '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' +endef |