packages/utils/ap51-flash/Makefile
Florian Fainelli 31f77baa3a ap51-flash: Define IPPORT_TFTP where it is used
Defining IPPORT_TFTP on the pre-processor command line leads to the
following error for glibc-based toolchains:

mipsel-linux-gnu-gcc -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc
-fno-caller-saves -mips16 -minterlink-mips16
-I/local/users/fainelli/openwrt/trunk/staging_dir/target-mipsel-linux-gnu_glibc/usr/include
-I/local/users/fainelli/openwrt/trunk/staging_dir/target-mipsel-linux-gnu_glibc/include
-I/opt/toolchains/stbgcc-4.8-1.5/usr/include
-I/opt/toolchains/stbgcc-4.8-1.5/include  -Wall -Werror -W -g3
-std=gnu99 -Os -fno-strict-aliasing -DLINUX
-DREVISION_VERSION=\"2016-10-16\" -DFLASH_FROM_FILE -DNO_LIBPCAP
-D_GNU_SOURCE -UIPPORT_TFTP -DIPPORT_TFTP=69 -MD -c flash.c -o flash.o
<command-line>:0:13: error: expected identifier before numeric constant

Instead, move this where this gets used, in proto.c

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2017-04-12 18:03:54 -07:00

58 lines
1.7 KiB
Makefile

#
# Copyright (C) 2010-2011 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:=ap51-flash
PKG_VERSION:=2016-10-16
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://dev.cloudtrax.com/ap51-flash.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=48b3fbac1c30c5968b2608eb09b53ea37c310a24
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
PKG_MAINTAINER:=Russell Senior <russell@personaltelco.net>
include $(INCLUDE_DIR)/package.mk
ifeq ($(CONFIG_BIG_ENDIAN),y)
STAMP_BUILT:=$(STAMP_BUILT)_big
endif
define Package/ap51-flash
SECTION:=utils
CATEGORY:=Utilities
TITLE:=A tool for flashing (nearly) all ap51/ap61 based routers
URL:=http://dev.cloudtrax.com/wiki/ap51-flash-station
endef
TARGET_EXTRA_CFLAGS:=-DFLASH_FROM_FILE -DNO_LIBPCAP -D_GNU_SOURCE
ifeq ($(CONFIG_BIG_ENDIAN),y)
TARGET_EXTRA_CFLAGS:=$(TARGET_EXTRA_CFLAGS) -DUIP_CONF_BYTE_ORDER=1234
endif
# pass optimization flags
MAKE_FLAGS += \
OFLAGS="$(TARGET_CFLAGS)" \
EXTRA_CFLAGS="$(TARGET_EXTRA_CFLAGS)" \
REVISION="$(PKG_VERSION)" \
ap51-flash
define Package/ap51-flash/install
$(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d $(1)/usr/sbin \
$(1)/usr/lib/ap51-flash
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ap51-flash $(1)/usr/sbin/
$(INSTALL_BIN) ./files/ap51-flash.init $(1)/etc/init.d/ap51-flash
$(INSTALL_BIN) ./files/ap51-flash.sh $(1)/usr/lib/ap51-flash/ap51-flash.sh
$(INSTALL_DATA) ./files/ap51-flash.config $(1)/etc/config/ap51-flash
endef
define Package/ap51-flash/conffiles
/etc/config/ap51-flash
endef
$(eval $(call BuildPackage,ap51-flash))