3 CFLAGS
= -Wall
-Os
$(EXTRACFLAGS
)
4 CFLAGS
+= -I.
-I
$(TOP
)/shared
-I
$(SRCBASE
)/include -idirafter
$(LINUXDIR
)/include
5 CFLAGS
+= -ffunction-sections
-fdata-sections
7 LDFLAGS
= -L
$(TOP
)/nvram
-lnvram
-L
$(TOP
)/shared
-lshared
-lcrypt
8 LDFLAGS
+= -ffunction-sections
-fdata-sections
-Wl
,--gc-sections
13 OBJS
:= rc.o init.o interface.o network.o wan.o services.o dhcp.o
14 OBJS
+= firewall.o ppp.o telssh.o wnas.o
15 OBJS
+= listen.o redial.o led.o qos.o forward.o misc.o mtd.o
16 OBJS
+= buttons.o restrict.o gpio.o sched.o
17 OBJS
+= account.o new_qoslimit.o arpbind.o
20 ifeq ($(TCONFIG_USB
),y
)
23 ifeq ($(TCONFIG_DDNS
),y
)
26 ifeq ($(TCONFIG_CIFS
),y
)
29 ifeq ($(TCONFIG_JFFS2
),y
)
32 ifeq ($(TCONFIG_OPENVPN
),y
)
35 ifeq ($(TCONFIG_NOCAT
),y
)
44 ifeq ($(TCONFIG_BT
),y
)
45 OBJS
+= transmission.o
48 ifeq ($(TCONFIG_NFS
),y
)
52 ifeq ($(TCONFIG_SNMP
),y
)
56 ifeq ($(TCONFIG_SDHC
),y
)
64 @
$(CC
) -o
$@
$^
$(LDFLAGS
)
70 @echo
"[rc] Installing..."
71 @
install -D rc
$(INSTALLDIR
)/sbin
/rc
72 @
$(STRIP
) $(INSTALLDIR
)/sbin
/rc
73 @chmod
0500 $(INSTALLDIR
)/sbin
/rc
75 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc init
76 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc console
77 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc hotplug
78 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc service
79 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc buttons
80 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc rcheck
81 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc radio
82 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc led
83 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc reboot
84 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc halt
85 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc redial
86 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc gpio
87 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc sched
89 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc disconnected_pppoe
90 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc listen
91 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc ppp_event
93 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc mtd-write
94 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc mtd-erase
95 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc mtd-unlock
97 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc dhcpc-event
98 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc dhcpc-release
99 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc dhcpc-renew
101 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc wldist
103 ifeq ($(TCONFIG_IPV6
),y
)
104 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc dhcp6c-state
107 ifeq ($(TCONFIG_DDNS
),y
)
108 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc ddns-update
111 # ifeq ($(TCONFIG_HEARTBEAT),y)
112 # @cd $(INSTALLDIR)/sbin && ln -sf rc hb_connect
113 # @cd $(INSTALLDIR)/sbin && ln -sf rc hb_disconnect
114 # @cd $(INSTALLDIR)/sbin && ln -sf rc hb_idle
117 ifeq ($(TCONFIG_CIFS
),y
)
118 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc mount-cifs
121 ifeq ($(TOMATO_SL
),1)
122 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc usbevent
123 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc usbrescan
124 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc hotdiskadd
125 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc hotdiskremove
126 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc hotdiskerror
127 @cd
$(INSTALLDIR
)/sbin
&& ln
-sf rc umountx
130 ifeq ($(TCONFIG_OPENVPN
),y
)
131 @mkdir
-p
$(INSTALLDIR
)/rom
/openvpn
132 @cp openvpn-updown.sh
$(INSTALLDIR
)/rom
/openvpn
/updown.sh
133 @chmod
0755 $(INSTALLDIR
)/rom
/openvpn
/updown.sh
137 rm -f rc
*.o .
*.depend
140 mipsel-uclibc-nm
--print-size
--size-sort rc
144 @
$(CC
) $(CFLAGS
) -c
$<
147 @
$(CC
) $(CFLAGS
) -M
$< > $@
149 -include $(OBJS
:%.o
=.
%.depend
)