core: Add generic CRC functions (templates expended to 8 16 32 64 bits)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
diff --git a/include/osmocom/core/Makefile.am b/include/osmocom/core/Makefile.am
index f131269..aabb775 100644
--- a/include/osmocom/core/Makefile.am
+++ b/include/osmocom/core/Makefile.am
@@ -3,7 +3,8 @@
 		   gsmtap.h write_queue.h prim.h \
 		   logging.h rate_ctr.h gsmtap_util.h \
 		   crc16.h panic.h process.h \
-		   backtrace.h conv.h application.h
+		   backtrace.h conv.h application.h \
+		   crcgen.h crc8gen.h crc16gen.h crc32gen.h crc64gen.h
 
 if ENABLE_PLUGIN
 osmocore_HEADERS += plugin.h
@@ -22,3 +23,7 @@
 endif
 
 osmocoredir = $(includedir)/osmocom/core
+
+crc%gen.h: crcXXgen.h.tpl
+	@echo "  SED    $< -> $@"
+	@sed -e's/XX/$*/g' $< > $@