Ticket #9365: Makefile

File Makefile, 1.5 KB (added by ciusss89 <ciusss@…>, 7 years ago)

Makefile

Line 
1#
2# Copyright (C) 2011 TIPALDI GIUSEPPE.
3#
4# Source Code wrote by Sebastian Gottschall, and adapted for openwrt from forum user crisman.
5# This is free software, licensed under the GNU General Public License v2.
6# See /LICENSE for more information.
7
8include $(TOPDIR)/rules.mk
9PKG_NAME:=clock-ubiquiti-rs
10PKG_VERSION:=1.0
11PKG_RELEASE:=1
12
13PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
14
15include $(INCLUDE_DIR)/package.mk
16
17define Package/clock-ubiquiti-rs
18  SECTION:=utils
19  CATEGORY:=Utilities
20  TITLE:=Frequency control for ubiquiti Router Station
21  MAINTAINER:=Your email address <ciusss89@gmail.com>
22endef
23
24define Package/clock-ubiquiti-rs/description
25        Utility for frequency control, rewrite new hex value
26        corresponding at new frequency value in mtd table.
27        Allowed frequency are 200,300,333,400,600,680,720,800.
28  Features:
29  - Utility for frequency control of router station board, based on ar7161 processor.
30endef
31
32define Build/Prepare
33        mkdir -p $(PKG_BUILD_DIR)
34        $(CP) ./src/* $(PKG_BUILD_DIR)/
35endef
36
37
38define Build/Compile
39        $(TARGET_CC) $(TARGET_CFLAGS) -D__Linux26__ -D_BSD_SOURCE=1 -c -I$(PKG_BUILD_DIR) -I$(STAGING_DIR)/usr/include -o $(PKG_BUILD_DIR)/clock-ubiquiti-rs.o $(PKG_BUILD_DIR)/clock-ubiquiti-rs.c
40        $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/clock-ubiquiti-rs -L$(STAGING_DIR)/usr/lib $(PKG_BUILD_DIR)/clock-ubiquiti-rs.o
41endef
42
43
44define Package/clock-ubiquiti-rs/install
45        $(INSTALL_DIR) $(1)/usr/bin
46        $(INSTALL_BIN) $(PKG_BUILD_DIR)/clock-ubiquiti-rs $(1)/usr/bin
47endef
48
49$(eval $(call BuildPackage,clock-ubiquiti-rs))