libtabular-c

C tabular formatting library
git clone https://git.sinitax.com/sinitax/libtabular-c
Log | Files | Refs | Submodules | sfeed.txt

build.jst (1058B)


      1
      2
      3cflags = -Wunused-function -Wunused-variable -Wconversion -Wformat
      4		-I include -O2 
      5
      6rule liba
      7	gcc -o $out.tmp.o $in $cflags -r
      8	objcopy --keep-global-symbols=liballoc.api $out.tmp.o $out.fixed.o
      9	ar rcs $out $out.fixed.o
     10	rm $out.tmp.o $out.fixed.o
     11
     12rule libso
     13	gcc -o $out $in $cflags -shared -Wl,-version-script liballoc.lds
     14
     15rule cc
     16	gcc -o $out $in $cflags
     17
     18rule mkdir
     19	mkdir $out
     20
     21target build
     22	mkdir
     23
     24target build/liballoc.a
     25	liba src/allocator.c | include/allocator.h build
     26
     27target build/liballoc.so
     28	libso src/allocator.c | include/allocator.h build
     29
     30target build/test
     31	cc src/test.c build/liballoc.a | build
     32
     33command clean
     34	rm -rf build
     35
     36command cleanall
     37	just clean
     38
     39command install
     40	install -m755 build/liballoc.a -t "/usr/local/lib"
     41	install -m755 build/liballoc.so -t "/usr/local/lib"
     42	install -m644 include/allocator.h -t "/usr/local/include"
     43
     44command uninstall
     45	rm -f "/usr/local/lib/liballoc.a"
     46	rm -f "/usr/local/lib/liballoc.so"
     47	rm -f "/usr/local/include/allocator.h"
     48
     49command all
     50	just build/liballoc.a build/liballoc.so build/test
     51