MINOR: halog: use the more recent dual-mode fgets2 implementation
This version implements both 32 and 64 bit versions at once, it
avoids the need to have two separate output files. It also improves
efficiency on i386 platforms by adding a little bit of assembly where
gcc isn't efficient.
diff --git a/contrib/halog/Makefile b/contrib/halog/Makefile
index c488470..680a5b7 100644
--- a/contrib/halog/Makefile
+++ b/contrib/halog/Makefile
@@ -2,15 +2,14 @@
INCLUDE = -I../../include -I$(EBTREE_DIR)
CC = gcc
+
+# note: it is recommended to also add -fomit-frame-pointer on i386
OPTIMIZE = -O3
-OBJS = halog halog64
+OBJS = halog
halog: halog.c fgets2.c
$(CC) $(OPTIMIZE) -o $@ $(INCLUDE) $(EBTREE_DIR)/ebtree.c $(EBTREE_DIR)/eb32tree.c $(EBTREE_DIR)/eb64tree.c $(EBTREE_DIR)/ebmbtree.c $(EBTREE_DIR)/ebsttree.c $(EBTREE_DIR)/ebistree.c $(EBTREE_DIR)/ebimtree.c $^
-halog64: halog.c fgets2-64.c
- $(CC) $(OPTIMIZE) -o $@ $(INCLUDE) $(EBTREE_DIR)/ebtree.c $(EBTREE_DIR)/eb32tree.c $(EBTREE_DIR)/eb64tree.c $(EBTREE_DIR)/ebmbtree.c $(EBTREE_DIR)/ebsttree.c $(EBTREE_DIR)/ebistree.c $(EBTREE_DIR)/ebimtree.c $^
-
clean:
rm -f $(OBJS)