libbootstr-c

C bootstring encoding library
git clone https://git.sinitax.com/sinitax/libbootstr-c
Log | Files | Refs | LICENSE | sfeed.txt

Makefile (919B)


      1PREFIX ?= /usr/local
      2LIBDIR ?= /lib
      3INCLDIR ?= /include
      4
      5all: build/libbootstr.so build/puny
      6
      7clean:
      8	rm -rf build
      9
     10build:
     11	mkdir build
     12
     13build/puny: src/puny.c build/libbootstr.so | build
     14	$(CC) -o $@ $< -g -I include -L build -lunistring -lbootstr
     15
     16build/libbootstr.so: src/bootstr.c include/bootstr.h | build
     17	$(CC) -o $@ $< -I include -fPIC -shared -lunistring
     18
     19test/%.phony: test/%.in test/%.out
     20	@echo "> test $*"
     21	test "$(shell cat test/$*.in | ./build/puny -e)" = "$(shell cat test/$*.out)"
     22	test "$(shell cat test/$*.out | ./build/puny -d)" = "$(shell cat test/$*.in)"
     23
     24test: build/puny test/puny-basic.phony
     25
     26install:
     27	install -m644 include/bootstr.h -t "$(DESTDIR)$(PREFIX)$(INCLDIR)"
     28	install -m755 build/libbootstr.so -t "$(DESTDIR)$(PREFIX)$(LIBDIR)"
     29
     30uninstall:
     31	rm -f "$(DESTDIR)$(PREFIX)$(INCLDIR)/bootstr.h"
     32	rm -f "$(DESTDIR)$(PREFIX)$(LIBDIR)/libbootstr.so"
     33
     34.PHONY: all clean test install uninstall