utf8proc

annotate Makefile @ 14:d0bab6ca89a5

Version 1.1.6

- PostgreSQL 9.2 and 9.3 compatibility (lowercase 'c' language name)
author jbe
date Wed Nov 27 12:00:00 2013 +0100 (2013-11-27)
parents 00d2bcbdc945
children 15450ff3d454
rev   line source
jbe@0 1 # libutf8proc Makefile
jbe@0 2
jbe@0 3
jbe@0 4 # settings
jbe@0 5
jbe@7 6 cflags = -O2 -std=c99 -pedantic -Wall -fpic $(CFLAGS)
jbe@9 7 cc = $(CC) $(cflags)
jbe@0 8
jbe@0 9
jbe@0 10 # meta targets
jbe@0 11
jbe@0 12 c-library: libutf8proc.a libutf8proc.so
jbe@0 13
jbe@0 14 ruby-library: ruby/utf8proc_native.so
jbe@0 15
jbe@0 16 pgsql-library: pgsql/utf8proc_pgsql.so
jbe@0 17
jbe@10 18 all: c-library ruby-library ruby-gem pgsql-library
jbe@0 19
jbe@0 20 clean::
jbe@0 21 rm -f utf8proc.o libutf8proc.a libutf8proc.so
jbe@0 22 cd ruby/ && test -e Makefile && (make clean && rm -f Makefile) || true
jbe@10 23 rm -Rf ruby/gem/lib ruby/gem/ext
jbe@10 24 rm -f ruby/gem/utf8proc-*.gem
jbe@0 25 cd pgsql/ && make clean
jbe@0 26
jbe@0 27 # real targets
jbe@0 28
jbe@0 29 utf8proc.o: utf8proc.h utf8proc.c utf8proc_data.c
jbe@0 30 $(cc) -c -o utf8proc.o utf8proc.c
jbe@0 31
jbe@0 32 libutf8proc.a: utf8proc.o
jbe@0 33 rm -f libutf8proc.a
jbe@0 34 ar rs libutf8proc.a utf8proc.o
jbe@0 35
jbe@0 36 libutf8proc.so: utf8proc.o
jbe@0 37 $(cc) -shared -o libutf8proc.so utf8proc.o
jbe@0 38 chmod a-x libutf8proc.so
jbe@0 39
jbe@9 40 libutf8proc.dylib: utf8proc.o
jbe@9 41 $(cc) -dynamiclib -o $@ $^ -install_name $(libdir)/$@
jbe@9 42
jbe@0 43 ruby/Makefile: ruby/extconf.rb
jbe@0 44 cd ruby && ruby extconf.rb
jbe@0 45
jbe@0 46 ruby/utf8proc_native.so: utf8proc.h utf8proc.c utf8proc_data.c \
jbe@0 47 ruby/utf8proc_native.c ruby/Makefile
jbe@0 48 cd ruby && make
jbe@0 49
jbe@10 50 ruby/gem/lib/utf8proc.rb: ruby/utf8proc.rb
jbe@10 51 test -e ruby/gem/lib || mkdir ruby/gem/lib
jbe@10 52 cp ruby/utf8proc.rb ruby/gem/lib/
jbe@10 53
jbe@10 54 ruby/gem/ext/extconf.rb: ruby/extconf.rb
jbe@10 55 test -e ruby/gem/ext || mkdir ruby/gem/ext
jbe@10 56 cp ruby/extconf.rb ruby/gem/ext/
jbe@10 57
jbe@10 58 ruby/gem/ext/utf8proc_native.c: utf8proc.h utf8proc_data.c utf8proc.c ruby/utf8proc_native.c
jbe@10 59 test -e ruby/gem/ext || mkdir ruby/gem/ext
jbe@10 60 cat utf8proc.h utf8proc_data.c utf8proc.c ruby/utf8proc_native.c | grep -v '#include "utf8proc.h"' | grep -v '#include "utf8proc_data.c"' | grep -v '#include "../utf8proc.c"' > ruby/gem/ext/utf8proc_native.c
jbe@10 61
jbe@10 62 ruby-gem:: ruby/gem/lib/utf8proc.rb ruby/gem/ext/extconf.rb ruby/gem/ext/utf8proc_native.c
jbe@10 63 cd ruby/gem && gem build utf8proc.gemspec
jbe@10 64
jbe@0 65 pgsql/utf8proc_pgsql.so: utf8proc.h utf8proc.c utf8proc_data.c \
jbe@0 66 pgsql/utf8proc_pgsql.c
jbe@0 67 cd pgsql && make
jbe@0 68

Impressum / About Us