tabular

Flexible input tabulator
git clone https://git.sinitax.com/sinitax/tabular
Log | Files | Refs | Submodules | sfeed.txt

build.rmk.tmpl (1072B)


      1#default PREFIX /usr/local
      2#default BINDIR /bin
      3#default CC gcc
      4
      5#ifdef DEBUG
      6#define OPT_CFLAGS -Og -g
      7#else
      8#define OPT_CFLAGS -O2
      9#endif
     10
     11cflags = -I lib/libdvec/include -I lib/libhmap/include
     12		-I lib/libtabular/include -I lib/liballoc/include
     13		-Wunused-variable -Wunused-function -Wconversion
     14		#{OPT_CFLAGS} #{EXTRA_CFLAGS} #{TABULAR_EXTRA_CFLAGS}
     15
     16rule cc
     17	#{CC} -o $out $in $cflags
     18
     19target lib/libdvec/build/libdvec.a
     20	rmk lib/libdvec
     21
     22target lib/libhmap/build/libhmap.a
     23	rmk lib/libhmap
     24
     25target lib/libtabular/build/libtabular.a
     26	rmk lib/libtabular
     27
     28target lib/liballoc/build/liballoc.a
     29	rmk lib/liballoc
     30
     31target tabular
     32	cc tabular.c lib/libdvec/build/libdvec.a lib/libhmap/build/libhmap.a
     33		lib/libtabular/build/libtabular.a lib/liballoc/build/liballoc.a
     34
     35command clean
     36	rm -f tabular
     37
     38command cleanall
     39	rmk clean
     40	rmk -C lib/libtabular clean
     41	rmk -C lib/libhmap clean
     42	rmk -C lib/libdvec clean
     43
     44command install
     45	install -m755 tabular -t "#{DESTDIR}#{PREFIX}#{BINDIR}"
     46
     47command uninstall
     48	rm -f "#{DESTDIR}#{PREFIX}#{BINDIR}/tabular"
     49
     50command all
     51	rmk tabular