mirror of
https://github.com/novatiq/packages.git
synced 2026-04-28 22:58:38 +01:00
140b3f2fe0
We are not properly passing down TARGET_CFLAGS and TARGET_CPPFLAGS and
this can be noticed with external toolchains with the following build
error:
mipsel-linux-gnu-gcc -Wall -Wextra -pedantic -Waggregate-return
-Wcast-align -Wcast-qual -Wdisabled-optimization -Wpointer-arith
-Wshadow -Wsign-compare -Wundef -Wwrite-strings -Wbad-function-cast
-Wdeclaration-after-statement -Wmissing-prototypes -Wnested-externs
-Wstrict-prototypes -O2 -std=c99 -I../lua/ -fPIC -c -o lpvm.o lpvm.c
lpvm.c:10:17: fatal error: lua.h: No such file or directory
#include "lua.h"
^
compilation terminated.
make[4]: *** [lpvm.o] Error 1
Re-use COPT to pass our TARGET_CFLAGS and TARGET_CPPFLAGS
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
50 lines
1.1 KiB
Makefile
50 lines
1.1 KiB
Makefile
#
|
|
# Copyright (C) 2015 OpenWrt.org
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=lpeg
|
|
PKG_VERSION:=0.12.2
|
|
PKG_RELEASE:=2
|
|
PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
|
|
PKG_LICENSE:=MIT
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
PKG_SOURCE_URL:=http://www.inf.puc-rio.br/~roberto/lpeg/
|
|
PKG_MD5SUM:=fabb614eb46e370d4f6b8fd82d17ca7e
|
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/lpeg
|
|
SUBMENU:=Lua
|
|
SECTION:=lang
|
|
CATEGORY:=Languages
|
|
TITLE:=LPeg
|
|
URL:=http://www.inf.puc-rio.br/~roberto/lpeg/
|
|
DEPENDS:=+lua
|
|
endef
|
|
|
|
define Package/lpeg/description
|
|
LPeg is a new pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs)
|
|
endef
|
|
|
|
define Build/Configure
|
|
endef
|
|
|
|
# add make variable overrides here
|
|
MAKE_FLAGS += \
|
|
COPT="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -O2"
|
|
|
|
define Package/lpeg/install
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lpeg.so $(1)/usr/lib/lua
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,lpeg))
|