Troy D. Hanson 10 years ago
parent
commit
75c6611ec3
4 changed files with 24 additions and 10 deletions
  1. 1 1
      libut/Makefile
  2. 21 8
      libut/README.md
  3. 1 0
      libut/include
  4. 1 1
      libut/tests/Makefile

+ 1 - 1
libut/Makefile

@@ -1,6 +1,6 @@
 OBJS=libut.a
 OBJS=libut.a
 all: $(OBJS) 
 all: $(OBJS) 
-INCDIR=../include
+INCDIR=./include
 CFLAGS=-I$(INCDIR)
 CFLAGS=-I$(INCDIR)
 CFLAGS+=-Wall -Wextra
 CFLAGS+=-Wall -Wextra
 CFLAGS+=-g
 CFLAGS+=-g

+ 21 - 8
libut/README.md

@@ -2,15 +2,28 @@ libut
 
 
 The "libut" directory is an alternative way to use uthash, utarray, utlist, 
 The "libut" directory is an alternative way to use uthash, utarray, utlist, 
 utstring and utvector in your programs. You can copy the libut directory
 utstring and utvector in your programs. You can copy the libut directory
-entirely into your own source tree, then use CFLAGS to add libut/include
-to your include-header search path (-I). 
+into your own source tree. Doing it this way dereferences symlinks: 
 
 
-There are two upshots of this. One is that you can just #include "libut.h"
-instead of uthash.h, utarray.h, etc. So it is a convenient wrapper. 
+    cp -RF libut $DESTINATION
 
 
-The other benefit of using the libut is that if you do a "make" in libut/
-it builds libut/libut.a, which you can then link into your program 
-using LDFLAGS -Llibut -lut. This makes the utvector available. 
+Then add CFLAGS to your application Makefile to pull in libut/include.
 
 
-This also links in the plumbing that supports having a utvector of utstrings.
+    CFLAGS=-I libut/include
 
 
+You can use libut.h as a wrapper to pull in uthash.h, utarray.h, etc. 
+
+    #include "libut.h"
+
+utvector
+
+The utvector is an alternative to utarray. It is a bit more efficient.
+It's object code, not just a header. To use utvector, build libut.a:
+
+    cd libut
+    make
+
+Link it into your program using:
+
+    LDFLAGS=-Llibut -lut
+
+Examples of using utvector are in libut/tests.

+ 1 - 0
libut/include

@@ -0,0 +1 @@
+../include

+ 1 - 1
libut/tests/Makefile

@@ -2,7 +2,7 @@ PROGS=test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12
       test13 test14 test15 test16
       test13 test14 test15 test16
 OBJS=$(patsubst %,%.o,$(PROGS))
 OBJS=$(patsubst %,%.o,$(PROGS))
 
 
-CFLAGS = -I../../include
+CFLAGS = -I../include
 CFLAGS += -g
 CFLAGS += -g
 CFLAGS += -Wall -Wextra
 CFLAGS += -Wall -Wextra
 LDFLAGS=-L.. -lut 
 LDFLAGS=-L.. -lut