e861a4bfeaa89a8125e2305c181d08ade8e6d2b3
[openwrt/openwrt.git] / tools / sstrip / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8 include $(INCLUDE_DIR)/host-build.mk
9
10 PKG_NAME:=sstrip
11 PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/sstrip
12
13 OS:=$(shell uname)
14 ifeq ($(HOST_OS),Darwin)
15 CFLAGS += -I./include
16 endif
17 CFLAGS += -I $(TOPDIR)/tools/include -include endian.h
18
19 define Build/Compile
20 $(CC) $(CFLAGS) -o $(PKG_BUILD_DIR)/sstrip src/sstrip.c
21 endef
22
23 define Build/Install
24 mkdir -p $(STAGING_DIR)/bin
25 $(CP) $(PKG_BUILD_DIR)/sstrip $(STAGING_DIR)/bin/
26 endef
27
28 define Build/Clean
29 rm -f $(STAGING_DIR)/bin/sstrip
30 endef
31
32 $(eval $(call HostBuild))