also link statically
[libjh.git] / compile.sh
index 6e3b1c6..b8e658e 100755 (executable)
@@ -25,7 +25,8 @@ echo "going ahead with CFLAGS=\"$CFLAGS\"..." >&2
 
 # generate header
 set +f
-cat *.h > gen/jh.h
+# needs correct order, so list them here
+cat header.h bufio.h > gen/jh.h
 set -f
 for source_file in $(ls|grep '\.c$'); do
   echo "extracting header data from $source_file..." >&2
@@ -82,4 +83,5 @@ done
 # ... and link!
 cd gen/obj
 $CC -shared -Wl,-soname,libjh.so -o ../libjh.so $(ls)
+ar rcs ../libjh.a $(ls)
 cd ../..