1 # build the Linksys pppoecd
3 # Note that this patches the linksys pppd before patching pppoecd.
4 # The pppd patch changes the pathnames that pppoecd will use.
5 # In an attempt to avoid conflicts the marker file is called
6 # .patched-pppoecd in the pppd directory.
8 PPPD_DIR
=$(BUILD_DIR
)/WRT54GS
/release
/src
/router
/ppp
/pppd
9 PPPD_PATCH
=$(SOURCE_DIR
)/pppoecd-pathnames.patch
11 PPPOECD_DIR
=$(BUILD_DIR
)/WRT54GS
/release
/src
/router
/ppp
/pppoecd
12 PPPOECD_PATCH
=$(SOURCE_DIR
)/pppoecd.patch
13 PPPOECD_BIN
=$(TARGET_DIR
)/sbin
/pppoecd
15 PPPOECD_IPK_DIR
=$(BUILD_DIR
)/pppoecd-1.0
16 PPPOECD_PACKAGE
=$(BUILD_DIR
)/pppoecd_1.0_mipsel.ipk
17 PPPOECD_IPK_BIN
=$(PPPOECD_IPK_DIR
)/sbin
/pppoecd
19 # patch pppd for the openwrt compatible path names
20 $(PPPD_DIR
)/.patched-pppoecd
: $(BUILD_DIR
)/WRT54GS
/.source
21 cat
$(PPPD_PATCH
) | patch
-d
$(PPPD_DIR
)
22 touch
$(PPPD_DIR
)/.patched-pppoecd
24 # patch the pppoecd itself for GCC3.x compatibility and to move pppoecd to /sbin
25 $(PPPOECD_DIR
)/.patched
: $(PPPD_DIR
)/.patched-pppoecd
26 cat
$(PPPOECD_PATCH
) | patch
-d
$(PPPOECD_DIR
)
27 touch
$(PPPOECD_DIR
)/.patched
29 # build the pppoecd binary for the ipk version
30 $(PPPOECD_IPK_BIN
): $(PPPOECD_DIR
)/.patched
31 mkdir
-p
$(PPPOECD_IPK_DIR
)/etc
/ppp
32 cp
$(SOURCE_DIR
)/pppoecd.ip-up
$(PPPOECD_IPK_DIR
)/etc
/ppp
/ip-up
33 chmod a
+x
$(PPPOECD_IPK_DIR
)/etc
/ppp
/ip-up
34 $(MAKE
) -C
$(PPPOECD_DIR
) CC
=$(TARGET_CC
) LD
=$(TARGET_CROSS
)ld \
35 SRCBASE
=$(OPENWRT_SRCBASE
) INSTALLDIR
=$(PPPOECD_IPK_DIR
) LIBDIR
=$(UCLIBC_DIR
)/lib \
39 # setup ipkg control files
40 $(PPPOECD_IPK_DIR
)/CONTROL
/control
:
41 mkdir
-p
$(PPPOECD_IPK_DIR
)/CONTROL
42 cp
$(SOURCE_DIR
)/pppoecd.prerm
$(PPPOECD_IPK_DIR
)/CONTROL
/prerm
43 chmod a
+x
$(PPPOECD_IPK_DIR
)/CONTROL
/prerm
44 cp
$(SOURCE_DIR
)/pppoecd.postrm
$(PPPOECD_IPK_DIR
)/CONTROL
/postrm
45 chmod a
+x
$(PPPOECD_IPK_DIR
)/CONTROL
/postrm
46 cp
$(SOURCE_DIR
)/pppoecd.conffiles
$(PPPOECD_IPK_DIR
)/CONTROL
/conffiles
47 cp
$(SOURCE_DIR
)/pppoecd.control
$(PPPOECD_IPK_DIR
)/CONTROL
/control
49 # build the ipk package
50 $(PPPOECD_PACKAGE
): $(PPPOECD_IPK_BIN
) $(PPPOECD_IPK_DIR
)/CONTROL
/control
51 cd
$(BUILD_DIR
); $(STAGING_DIR
)/bin
/ipkg-build
-c
-o root
-g root pppoecd-1.0
53 # main target for building the ipk version
54 pppoecd-ipk
: $(PPPOECD_PACKAGE
)
57 $(PPPOECD_BIN
): $(PPPOECD_DIR
)/.patched
58 mkdir
$(TARGET_DIR
)/etc
/ppp
59 cp
$(SOURCE_DIR
)/pppoecd.ip-up
$(TARGET_DIR
)/etc
/ppp
/ip-up
60 chmod a
+x
$(TARGET_DIR
)/etc
/ppp
/ip-up
61 $(MAKE
) -C
$(PPPOECD_DIR
) CC
=$(TARGET_CC
) LD
=$(TARGET_CROSS
)ld \
62 SRCBASE
=$(OPENWRT_SRCBASE
) INSTALLDIR
=$(TARGET_DIR
) LIBDIR
=$(UCLIBC_DIR
)/lib \
66 # main target for building the embedded version
67 pppoecd
: $(PPPOECD_BIN
)
70 -$(MAKE
) -C
$(PPPOECD_DIR
) clean
71 rm -f
$(TARGET_DIR
)/usr
/sbin
/pppoecd
72 rm -rf
$(PPPOECD_IPK_DIR
)
73 rm -f
$(PPPOECD_PACKAGE
)
This page took 0.04369 seconds and 5 git commands to generate.