3 CFLAGS
= -Wall
-Os
$(EXTRACFLAGS
)
4 CFLAGS
+= -I.
-I
$(TOP
)/shared
-I
$(SRCBASE
)/include -idirafter
$(LINUXDIR
)/include
5 CFLAGS
+= -ffunction-sections
-fdata-sections
8 ifeq ($(TCONFIG_BCMARM
),y
)
9 LDFLAGS
= -L
$(TOP
)/nvram
${BCMEX} -lnvram
-L
$(TOP
)/shared
-lshared
-lcrypt
-L
$(TOP
)/libbcmcrypto
-lbcmcrypto
10 CFLAGS
+= -I
$(SRCBASE
)/shared
/bcmwifi
/include -DHAVE_TYPE_FLOAT
11 CFLAGS
+= -I
$(SRCBASE
)/common
/include
12 LDFLAGS
+= -L
$(TOP
)/libbcm
-lbcm
15 LDFLAGS
= -L
$(TOP
)/nvram
-lnvram
-L
$(TOP
)/shared
-lshared
-lcrypt
18 LDFLAGS
+= -ffunction-sections
-fdata-sections
-Wl
,--gc-sections
23 LDFLAGS
+= $(EXTRA_LDFLAGS
)
25 ifeq ($(TCONFIG_BCMSMP
),y
)
29 OBJS
:= rc.o init.o interface.o network.o wan.o services.o dhcp.o
30 OBJS
+= firewall.o ppp.o telssh.o wnas.o
31 OBJS
+= listen.o redial.o led.o qos.o forward.o misc.o mtd.o
32 OBJS
+= buttons.o restrict.o gpio.o sched.o
33 OBJS
+= new_qoslimit.o arpbind.o
36 ifeq ($(TCONFIG_BCMARM
),y
)
40 #ifeq ($(CONFIG_BCMWL6),y)
44 ifeq ($(TCONFIG_USB
),y
)
47 ifeq ($(TCONFIG_DDNS
),y
)
50 ifeq ($(TCONFIG_CIFS
),y
)
53 ifeq ($(TCONFIG_JFFS2
),y
)
56 ifeq ($(TCONFIG_OPENVPN
),y
)
59 ifeq ($(TCONFIG_TINC
),y
)
62 ifeq ($(TCONFIG_PPTPD
),y
)
67 ifeq ($(TCONFIG_NOCAT
),y
)
71 ifeq ($(TCONFIG_NGINX
),y
)
80 ifeq ($(TCONFIG_BT
),y
)
81 OBJS
+= transmission.o
84 ifeq ($(TCONFIG_NFS
),y
)
88 ifeq ($(TCONFIG_SNMP
),y
)
92 ifeq ($(TCONFIG_SDHC
),y
)
96 ifeq ($(TCONFIG_UPS
),y
)
100 ifeq ($(TCONFIG_TOR
),y
)
104 ifeq ($(TCONFIG_BCMARM
),y
)
105 vpath
%.c
$(SRCBASE
)/shared
112 @
$(CC
) -o
$@
$^
$(LDFLAGS
)
118 @echo
"[rc] Installing..."
119 @
install -D rc
$(INSTALLDIR
)/sbin
/rc
120 @
$(STRIP
) $(INSTALLDIR
)/sbin
/rc
121 @chmod
0500 $(INSTALLDIR
)/sbin
/rc
123 ifeq ($(TCONFIG_BCMARM
),y
)
124 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc preinit
126 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc init
128 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc console
129 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc hotplug
130 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc service
131 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc buttons
132 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc blink_5g
133 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc rcheck
134 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc radio
135 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc led
136 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc reboot
137 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc halt
138 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc redial
139 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc gpio
140 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc sched
142 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc disconnected_pppoe
143 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc listen
144 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc ppp_event
146 ifeq ($(TCONFIG_BCMARM
),y
)
147 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc mtd-write2
148 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc mtd-erase2
149 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc nvram_erase
151 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc mtd-write
152 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc mtd-erase
154 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc mtd-unlock
156 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc dhcpc-event
157 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc dhcpc-release
158 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc dhcpc-renew
160 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc wldist
162 ifeq ($(TCONFIG_IPV6
),y
)
163 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc dhcp6c-state
166 ifeq ($(TCONFIG_DDNS
),y
)
167 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc ddns-update
170 ifeq ($(TCONFIG_CIFS
),y
)
171 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc mount-cifs
174 ifeq ($(TOMATO_SL
),1)
175 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc usbevent
176 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc usbrescan
177 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc hotdiskadd
178 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc hotdiskremove
179 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc hotdiskerror
180 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc umountx
183 ifeq ($(TCONFIG_OPENVPN
),y
)
184 @mkdir
-p
$(INSTALLDIR
)/rom
/openvpn
185 @cp openvpn-updown.sh
$(INSTALLDIR
)/rom
/openvpn
/updown.sh
186 @chmod
0755 $(INSTALLDIR
)/rom
/openvpn
/updown.sh
190 rm -f rc
*.o .
*.depend
193 mipsel-uclibc-nm
--print-size
--size-sort rc
197 @
$(CC
) $(CFLAGS
) -c
$<
200 @
$(CC
) $(CFLAGS
) -M
$< > $@
202 -include $(OBJS
:%.o
=.
%.depend
)