ar71xx: Add profile and build image for TP-Link MR12U v1
[openwrt/staging/yousong.git] / target / sdk / files / Makefile
1 # Makefile for OpenWrt
2 #
3 # Copyright (C) 2007-2015 OpenWrt.org
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 TOPDIR:=${CURDIR}
10 LC_ALL:=C
11 LANG:=C
12 SDK:=1
13 export TOPDIR LC_ALL LANG SDK
14
15 world:
16
17 include $(TOPDIR)/include/host.mk
18
19 ifneq ($(OPENWRT_BUILD),1)
20 override OPENWRT_BUILD=1
21 export OPENWRT_BUILD
22
23 empty:=
24 space:= $(empty) $(empty)
25 _SINGLE=export MAKEFLAGS=$(space);
26
27 include $(TOPDIR)/include/debug.mk
28 include $(TOPDIR)/include/depends.mk
29 include $(TOPDIR)/include/toplevel.mk
30 else
31 include rules.mk
32 include $(INCLUDE_DIR)/depends.mk
33 include $(INCLUDE_DIR)/subdir.mk
34 include package/Makefile
35
36 $(package/stamp-compile): $(BUILD_DIR)/.prepared
37 $(BUILD_DIR)/.prepared: Makefile
38 @mkdir -p $$(dirname $@)
39 @touch $@
40
41 clean: FORCE
42 git clean -f -d $(STAGING_DIR); true
43 git clean -f -d $(BUILD_DIR); true
44 git clean -f -d $(BIN_DIR); true
45
46 dirclean: clean
47 git reset --hard HEAD
48 git clean -f -d
49 rm -rf feeds/
50
51 # check prerequisites before starting to build
52 prereq: $(package/stamp-prereq) ;
53
54 world: prepare $(package/stamp-compile) FORCE
55 @$(MAKE) package/index
56
57 .PHONY: clean dirclean prereq prepare world
58
59 endif