Merge into master from pull request #250:
loci: do not generate header classes for messages (https://github.com/floodlight/loxigen/pull/250)
diff --git a/c_gen/codegen.py b/c_gen/codegen.py
index fe5e2ad..89a0a81 100644
--- a/c_gen/codegen.py
+++ b/c_gen/codegen.py
@@ -122,7 +122,7 @@
# TODO remove header classes and use the corresponding class instead
def generate_header_classes(install_dir):
for cls in of_g.standard_class_order:
- if cls.find("_header") < 0:
+ if cls.find("_header") < 0 or cls in ["of_header", "of_bsn_header", "of_nicira_header"]:
continue
with template_utils.open_output(install_dir, "loci/src/%s.c" % cls) as out:
util.render_template(out, "class.c",
diff --git a/c_gen/templates/locitest/Makefile b/c_gen/templates/locitest/Makefile
index 70e57ca..00a2f95 100644
--- a/c_gen/templates/locitest/Makefile
+++ b/c_gen/templates/locitest/Makefile
@@ -10,7 +10,7 @@
all: locitest
locitest: $(LOCITEST_OBJS) loci.a
- $(CC) $^ -o $@
+ $(CC) -Wl,--whole-archive $^ -Wl,--no-whole-archive -o $@
loci.a: $(LOCI_OBJS)
ar rc $@ $^