[rtems-libbsd commit] pfctl: build files.

Sebastian Huber sebh at rtems.org
Wed Aug 3 12:44:14 UTC 2016


Module:    rtems-libbsd
Branch:    4.11
Commit:    f19c53caabe9012f06e0c4088bfd5f5788563014
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=f19c53caabe9012f06e0c4088bfd5f5788563014

Author:    Christian Mauderer <Christian.Mauderer at embedded-brains.de>
Date:      Tue Jul  5 16:08:38 2016 +0200

pfctl: build files.

---

 libbsd.py | 17 +++++++++++++++++
 wscript   | 20 ++++++++++++++++++++
 2 files changed, 37 insertions(+)

diff --git a/libbsd.py b/libbsd.py
index e22f4ee..0aeb02d 100755
--- a/libbsd.py
+++ b/libbsd.py
@@ -1787,6 +1787,8 @@ def user_space(mm):
     mod = builder.Module('user_space')
     mod.addUserSpaceHeaderFiles(
         [
+            'contrib/pf/pfctl/pfctl.h',
+            'contrib/pf/pfctl/pfctl_parser.h',
             'include/arpa/ftp.h',
             'include/arpa/inet.h',
             'include/arpa/nameser_compat.h',
@@ -1872,6 +1874,12 @@ def user_space(mm):
                                      mm.generator['convert'](),
                                      mm.generator['convert'](),
                                      mm.generator['route-keywords']()))
+    mod.addFile(mm.generator['file']('contrib/pf/pfctl/parse.y',
+                                     mm.generator['freebsd-path'](),
+                                     mm.generator['convert'](),
+                                     mm.generator['convert'](),
+                                     mm.generator['yacc']('pfctly',
+                                                          'parse.h')))
     mod.addUserSpaceSourceFiles(
         [
             'lib/libc/db/btree/bt_close.c',
@@ -1904,6 +1912,15 @@ def user_space(mm):
     mod.addUserSpaceSourceFiles(
         [
             'bin/hostname/hostname.c',
+            'contrib/pf/pfctl/pfctl_altq.c',
+            'contrib/pf/pfctl/pfctl.c',
+            'contrib/pf/pfctl/pfctl_optimize.c',
+            'contrib/pf/pfctl/pfctl_osfp.c',
+            'contrib/pf/pfctl/pfctl_parser.c',
+            'contrib/pf/pfctl/pfctl_qstats.c',
+            'contrib/pf/pfctl/pfctl_radix.c',
+            'contrib/pf/pfctl/pfctl_table.c',
+            'contrib/pf/pfctl/pf_print_state.c',
             'lib/libc/gen/err.c',
             'lib/libc/gen/feature_present.c',
             'lib/libc/gen/gethostname.c',
diff --git a/wscript b/wscript
index ca9a9c8..bdfc226 100644
--- a/wscript
+++ b/wscript
@@ -224,6 +224,17 @@ def build(bld):
                 source = "freebsd/lib/libc/net/nsparser.c")
     libbsd_use += ["yacc__nsyy"]
     if bld.env.AUTO_REGEN:
+        bld(target = "freebsd/contrib/pf/pfctl/parse.c",
+            source = "freebsd/contrib/pf/pfctl/parse.y",
+            rule = "${YACC} -b pfctly -d -p pfctly ${SRC} && sed -e '/YY_BUF_SIZE/s/16384/1024/' < pfctly.tab.c > ${TGT} && rm -f pfctly.tab.c && mv pfctly.tab.h freebsd/contrib/pf/pfctl/parse.h")
+    bld.objects(target = "yacc_pfctly",
+                features = "c",
+                cflags = cflags,
+                includes = [] + includes,
+                defines = [],
+                source = "freebsd/contrib/pf/pfctl/parse.c")
+    libbsd_use += ["yacc_pfctly"]
+    if bld.env.AUTO_REGEN:
         bld(target = "freebsd/contrib/libpcap/grammar.c",
             source = "freebsd/contrib/libpcap/grammar.y",
             rule = "${YACC} -b pcap -d -p pcap ${SRC} && sed -e '/YY_BUF_SIZE/s/16384/1024/' < pcap.tab.c > ${TGT} && rm -f pcap.tab.c && mv pcap.tab.h freebsd/contrib/libpcap/tokdefs.h")
@@ -237,6 +248,15 @@ def build(bld):
 
     # Objects built with different CFLAGS
     objs01_source = ['freebsd/bin/hostname/hostname.c',
+                     'freebsd/contrib/pf/pfctl/pf_print_state.c',
+                     'freebsd/contrib/pf/pfctl/pfctl.c',
+                     'freebsd/contrib/pf/pfctl/pfctl_altq.c',
+                     'freebsd/contrib/pf/pfctl/pfctl_optimize.c',
+                     'freebsd/contrib/pf/pfctl/pfctl_osfp.c',
+                     'freebsd/contrib/pf/pfctl/pfctl_parser.c',
+                     'freebsd/contrib/pf/pfctl/pfctl_qstats.c',
+                     'freebsd/contrib/pf/pfctl/pfctl_radix.c',
+                     'freebsd/contrib/pf/pfctl/pfctl_table.c',
                      'freebsd/lib/libc/gen/err.c',
                      'freebsd/lib/libc/gen/feature_present.c',
                      'freebsd/lib/libc/gen/gethostname.c',




More information about the vc mailing list