2 # Copyright (C) 2007 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR)/rules.mk
9 PKG_NAME:=patch-cmdline
11 PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)
13 include $(INCLUDE_DIR)/host-build.mk
16 ifeq ($(HOST_OS),Darwin)
19 CFLAGS += -I $(TOPDIR)/tools/include -include endian.h
22 $(CC) $(CFLAGS) -o $(PKG_BUILD_DIR)/$(PKG_NAME) src/$(PKG_NAME).c
26 mkdir -p $(STAGING_DIR)/bin
27 $(CP) $(PKG_BUILD_DIR)/patch-cmdline $(STAGING_DIR)/bin/
31 -rm -f $(STAGING_DIR)/bin/patch-cmdline
34 $(eval $(call HostBuild))