summaryrefslogtreecommitdiffstats
path: root/package/openwrt/wlc/Makefile
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-03-15 00:00:54 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-03-15 00:00:54 +0000
commitf48bb2f9d83244caebcbcf30373fba077016f053 (patch)
treee274aa48b99869e847c6ffbba0bf790f12fdc54b /package/openwrt/wlc/Makefile
parent94c100d3c21074b8f31753ceadf4406ab21be420 (diff)
add wlc (wl replacement)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@373 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/openwrt/wlc/Makefile')
-rw-r--r--package/openwrt/wlc/Makefile46
1 files changed, 46 insertions, 0 deletions
diff --git a/package/openwrt/wlc/Makefile b/package/openwrt/wlc/Makefile
new file mode 100644
index 000000000..378f18707
--- /dev/null
+++ b/package/openwrt/wlc/Makefile
@@ -0,0 +1,46 @@
+#
+# Linux router shared code Makefile
+#
+# Copyright 2001-2003, Broadcom Corporation
+# All Rights Reserved.
+#
+# THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
+# KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
+# SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
+# FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
+#
+# $Id$
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=wlc
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
+
+EXTRA_CFLAGS := -c -I. -I../include
+
+all: compile
+
+WLC_OBJS:=
+define OBJ_template
+$(PKG_BUILD_DIR)/$(1): $(PKG_BUILD_DIR)
+ $(TARGET_CC) $(TARGET_CFLAGS) $(EXTRA_CFLAGS) -o $$@ $$(patsubst %.o,%.c,$(1))
+WLC_OBJS += $(PKG_BUILD_DIR)/$(1)
+endef
+
+OBJS := wlc.o
+$(foreach obj,$(OBJS),$(eval $(call OBJ_template,$(obj))))
+
+$(PKG_BUILD_DIR):
+ mkdir -p $(PKG_BUILD_DIR)
+
+$(PKG_BUILD_DIR)/wlc: $(WLC_OBJS)
+ $(TARGET_CC) -o $@ $^ -lshared
+
+$(TARGET_DIR)/usr/sbin/wlc: $(PKG_BUILD_DIR)/wlc
+ install -m 755 $^ $@
+ $(STRIP) $@
+
+compile: $(PKG_BUILD_DIR)/wlc
+install: $(TARGET_DIR)/usr/sbin/wlc
+
+clean:
+ rm -rf $(PKG_BUILD_DIR)