Troy D. Hanson 10 년 전
부모
커밋
75c6611ec3
4개의 변경된 파일24개의 추가작업 그리고 10개의 파일을 삭제
  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
 all: $(OBJS) 
-INCDIR=../include
+INCDIR=./include
 CFLAGS=-I$(INCDIR)
 CFLAGS+=-Wall -Wextra
 CFLAGS+=-g

+ 21 - 8
libut/README.md

@@ -2,15 +2,28 @@ libut
 
 The "libut" directory is an alternative way to use uthash, utarray, utlist, 
 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
 OBJS=$(patsubst %,%.o,$(PROGS))
 
-CFLAGS = -I../../include
+CFLAGS = -I../include
 CFLAGS += -g
 CFLAGS += -Wall -Wextra
 LDFLAGS=-L.. -lut