Makefile 683 B

1234567891011121314151617181920212223242526272829303132
  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. PKG_NAME:=sstrip
  10. PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/sstrip
  11. OS:=$(shell uname)
  12. ifeq ($(HOST_OS),Darwin)
  13. CFLAGS += -I./include
  14. endif
  15. CFLAGS += -I $(TOPDIR)/tools/include -include endian.h
  16. define Build/Compile
  17. $(CC) $(CFLAGS) -o $(PKG_BUILD_DIR)/sstrip src/sstrip.c
  18. endef
  19. define Build/Install
  20. mkdir -p $(STAGING_DIR)/bin
  21. $(CP) $(PKG_BUILD_DIR)/sstrip $(STAGING_DIR)/bin/
  22. endef
  23. define Build/Clean
  24. rm -f $(STAGING_DIR)/bin/sstrip
  25. endef
  26. $(eval $(call HostBuild))