1# 2# Copyright 2005 Hon Hai Precision Ind. Co. Ltd. 3# All Rights Reserved. 4# No portions of this material shall be reproduced in any form without the 5# written permission of Hon Hai Precision Ind. Co. Ltd. 6# 7# All information contained in this document is Hon Hai Precision Ind. 8# Co. Ltd. company private, proprietary, and trade secret property and 9# are protected by international intellectual property laws and treaties. 10# 11# $Id$ 12# 13 14include config.mk 15include config.in 16 17# 18# Paths 19# 20# 21 22SUBDIRS := 23SUBDIRS2 := minidlna 24SUBDIRS3 := timemachine 25 26SUBDIRS += curl 27 28#SUBDIRS += lua 29#SUBDIRS += lsync 30#SUBDIRS += libxml2-2.7.2 31#MYSUBDIRS += gsoap 32#SUBDIRS += libpng 33 34ifeq ($(CONFIG_TIMEMACHINE),y) 35SUBDIRS += timemachine 36endif 37#SUBDIRS += dnsmasq 38SUBDIRS += dnsmasq-2.15 39SUBDIRS += udhcpd 40#SUBDIRS += ppp/pppoecd 41SUBDIRS += ppp-2.4.4/pppd pppoecd 42SUBDIRS += ntpclient 43SUBDIRS += bzip2 44 45#SUBDIRS +=openssl 46SUBDIRS += openssl-1.0.2h 47#SUBDIRS +=lzo-2.06 48ifeq ($(CONFIG_OPENVPN),y) 49SUBDIRS +=openvpn-2.3.1 50#SUBDIRS +=GeoIP-1.5.1 51endif 52# allenwen add for openvpn 53 54ifeq ($(CONFIG_TCPDUMP),y) 55SUBDIRS +=libpcap-1.4.0 56SUBDIRS +=tcpdump-4.4.0 57endif 58 59ifeq ($(CONFIG_RIP),y) 60SUBDIRS += zebra 61endif 62 63ifeq ($(CONFIG_PPTP),y) 64#SUBDIRS += ppp-2.4.4/pppd pptp 65# SUBDIRS += ppp/pppd pptp 66SUBDIRS += pptp 67endif 68 69ifeq ($(CONFIG_L2TP),y) 70SUBDIRS += l2tpd-0.69 71endif 72 73#ifeq ($(CONFIG_BPA),y) 74#SUBDIRS += bpalogin 75#endif 76 77ifeq ($(CONFIG_DLNA),y) 78SUBDIRS += minidlna 79endif 80 81ifeq ($(CONFIG_ISERVER),y) 82SUBDIRS += iserver 83endif 84 85 86SUBDIRS += zeroconf-0.9 87 88#water, 10/30/2008, @samba 89ifeq ($(SAMBA_ENABLE_FLAG),y) 90#SUBDIRS += samba-3.0.13 91SUBDIRS += samba-3.0.25b 92SUBDIRS += bftpd-1.6.6 93SUBDIRS += hdparm-9.43 94SUBDIRS += hd-idle-1.04 95endif 96 97# pling added 05/04/2009, for NTFS-3g 98ifeq ($(CONFIG_NTFS_3G),y) 99SUBDIRS += ntfs-3g-2009.3.8 100endif 101#pling added 05/07/2009, for mtools (to read FAT volume label) 102ifeq ($(CONFIG_MTOOLS),y) 103SUBDIRS += mtools-4.0.10 104endif 105#Foxconn add start, stanley, 01/16/2010 @IGMP 106ifeq ($(CONFIG_IGMP_PROXY),y) 107SUBDIRS += IGMP-PROXY 108endif 109#Foxconn add end, stanley, 01/16/2010 @IGMP 110SUBDIRS += iproute2 111 112# Foxconn add start by Hank for ecosystem support 08/14/2012 113ifeq ($(CONFIG_DOWNLOADER),y) 114SUBDIRS +=transmission 115SUBDIRS +=amule 116endif 117ifeq ($(CONFIG_WGET),y) 118OPENSSL_DIR = $(GPLTOPDIR)/openssl 119WGET_DIR = wget-1.12 120SUBDIRS += $(WGET_DIR) 121endif 122 123# Foxconn Perry added start, for zip and unzip 2013/05/09 124SUBDIRS += zip30 unzip60 125 126# foxconn Han edited, 08/22/2014 for Micromax dongle support 127ifeq ($(ENABLE_HSDPA_MODEM),y) 128SUBDIRS += Micromax 129endif 130 131# Foxconn Perry added, 11/19/2014, for Facebook WiFi debug 132ifeq ($(CONFIG_FBWIFI_DEBUG),y) 133SUBDIRS += ncftp-3.2.5 134endif 135 136# [Foxc] BrianYang, 2014/11/24, Implement kwilt support 137ifeq ($(CONFIG_KWILT),y) 138SUBDIRS += netkit-ftp-0.18-pre1 139endif 140 141# [Foxc] BrianYang, 2014/12/18, Porting PPTPD with MPPE 142ifeq ($(CONFIG_PPTPD_SUPPORT),y) 143SUBDIRS += pptpd 144endif 145 146all: ECOSYSTEM config 147 for i in ${SUBDIRS}; do \ 148 (cd $$i; make) || exit 1; \ 149 done 150 151tm: 152 for i in ${SUBDIRS3}; do \ 153 (cd $$i; make ; make install) || exit 1; \ 154 done 155 156dlna: 157 for i in ${SUBDIRS2}; do \ 158 (cd $$i; make) || exit 1; \ 159 done 160 161ECOSYSTEM: 162ifeq ($(CONFIG_WGET),y) 163 #mkdir -p $(OPENSSL_DIR)/lib && rm -rf $(OPENSSL_DIR)/lib/libssl.so.1.0.0 && cp $(TOOLCHAIN)/usr/lib/libssl.so.1.0.0 $(OPENSSL_DIR)/lib/ 164 cd $(WGET_DIR) && $(CONFIGURE) CFLAGS="$(CFLAGS) -DMB_CUR_MAX=1" LDFLAGS="$(LDFLAGS) -L$(OPENSSL_DIR)" \ 165 --with-ssl=openssl --with-libssl-prefix=$(OPENSSL_DIR) --prefix=$(TARGETDIR) 166endif 167 # Foxconn add end by Hank for ecosystem support 08/14/2012 168 169config: openssl_config GeoIP_config openvpn_config tcpdump_config 170 171openssl_config: 172 if [ ! -f ./openssl-1.0.2h/config.log ];then \ 173 cd openssl-1.0.2h && (CC=gcc CFLAGS="$(CFLAGS)" ./config no-asm shared --openssldir=$(TARGETDIR) && make depend) && \ 174 touch config.log; \ 175 fi 176 177 178libpcap_config: 179 if [ ! -f ./libpcap-1.4.0/Makefile ];then \ 180 cd libpcap-1.4.0 && (CC=$(CROSS_COMPILE)gcc CFLAGS="$(CFLAGS)" \ 181 $(CONFIGURE) --with-pcap=linux --prefix=$(SRCBASE)/../ap/gpl/libpcap-1.4.0/lib); \ 182 fi 183 184libpcap_make: libpcap_config 185 cd libpcap-1.4.0 && make install 186 187tcpdump_config: libpcap_make 188 if [ ! -f ./tcpdump-4.4.0/Makefile ];then \ 189 cd tcpdump-4.4.0 && (CC=$(CROSS_COMPILE)gcc CFLAGS="$(CFLAGS)" \ 190 $(CONFIGURE) ac_cv_linux_vers=2 --prefix=$(TARGETDIR)/usr); \ 191 fi 192 193GeoIP_config: 194 if [ ! -f ./GeoIP-1.5.1/Makefile ];then \ 195 cd GeoIP-1.5.1 && (CC=$(CROSS_COMPILE)gcc \ 196 ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes CFLAGS="$(CFLAGS)" \ 197 $(CONFIGURE) --with-gnu-ld --prefix=$(TARGETDIR)/usr); \ 198 fi 199 200lzo_config: 201 if [ ! -f ./lzo-2.06/Makefile ];then \ 202 cd lzo-2.06 && (CC=$(CROSS_COMPILE)gcc CFLAGS="$(CFLAGS)" \ 203 $(CONFIGURE) --prefix=$(TARGETDIR)/usr/local); \ 204 fi 205 206lzo_make: lzo_config 207 cd lzo-2.06 && make install 208 209openvpn_config: lzo_make 210 if [ ! -f ./openvpn-2.3.1/Makefile ];then \ 211 cd openvpn-2.3.1 && (CC=$(CROSS_COMPILE)gcc LZO_CFLAGS=-I$(TARGETDIR)/usr/local/include \ 212 LZO_LIBS="-L$(TARGETDIR)/usr/local/lib -llzo2" \ 213 CFLAGS="$(CFLAGS) -I$(SRCBASE)/../ap/acos/include" \ 214 LDFLAGS="-L$(ROUTERDIR)/nvram -L$(INSTALLDIR)/nvram/usr/lib -lnvram" \ 215 $(CONFIGURE) --prefix=$(TARGETDIR)/usr/local --disable-pam-dlopen \ 216 --disable-plugin-auth-pam); \ 217 fi 218 219install: 220 for i in ${SUBDIRS}; do \ 221 (cd $$i; make install) || exit 1; \ 222 done 223 224clean: 225 for i in ${SUBDIRS}; do \ 226 (cd $$i; make clean); \ 227 done 228 229.PHONY: $(SUBDIRS) 230