]> granicus.if.org Git - onig/blob - Makefile.am
onig-5.9.2
[onig] / Makefile.am
1 ## Makefile.am for Oniguruma
2 encdir    = $(top_srcdir)/enc
3 sampledir = $(top_srcdir)/sample
4 libname = libonig.la
5
6 #AM_CFLAGS = -DNOT_RUBY
7 AM_CFLAGS =
8 INCLUDES  = -I$(top_srcdir) -I$(includedir)
9
10 SUBDIRS = . sample
11
12 include_HEADERS = oniguruma.h oniggnu.h onigposix.h
13 lib_LTLIBRARIES = $(libname)
14
15 libonig_la_SOURCES = regint.h regparse.h regenc.h st.h \
16         regerror.c regparse.c regext.c regcomp.c regexec.c reggnu.c \
17         regenc.c regsyntax.c regtrav.c regversion.c st.c \
18         regposix.c regposerr.c \
19         $(encdir)/unicode.c $(encdir)/ascii.c $(encdir)/utf8.c \
20         $(encdir)/utf16_be.c $(encdir)/utf16_le.c \
21         $(encdir)/utf32_be.c $(encdir)/utf32_le.c \
22         $(encdir)/euc_jp.c $(encdir)/sjis.c $(encdir)/iso8859_1.c \
23         $(encdir)/iso8859_2.c  $(encdir)/iso8859_3.c \
24         $(encdir)/iso8859_4.c  $(encdir)/iso8859_5.c \
25         $(encdir)/iso8859_6.c  $(encdir)/iso8859_7.c \
26         $(encdir)/iso8859_8.c  $(encdir)/iso8859_9.c \
27         $(encdir)/iso8859_10.c $(encdir)/iso8859_11.c \
28         $(encdir)/iso8859_13.c $(encdir)/iso8859_14.c \
29         $(encdir)/iso8859_15.c $(encdir)/iso8859_16.c \
30         $(encdir)/euc_tw.c $(encdir)/euc_kr.c $(encdir)/big5.c \
31         $(encdir)/gb18030.c $(encdir)/koi8_r.c $(encdir)/cp1251.c
32
33 libonig_la_LDFLAGS = -version-info $(LTVERSION)
34
35 EXTRA_DIST = HISTORY README.ja index.html index_ja.html \
36         doc/API doc/API.ja doc/RE doc/RE.ja doc/FAQ doc/FAQ.ja \
37         win32/Makefile win32/config.h win32/testc.c \
38         $(encdir)/koi8.c $(encdir)/mktable.c \
39         $(sampledir)/encode.c $(sampledir)/listcap.c $(sampledir)/names.c \
40         $(sampledir)/posix.c $(sampledir)/simple.c $(sampledir)/sql.c \
41         $(sampledir)/syntax.c
42
43 bin_SCRIPTS = onig-config
44
45 onig-config: onig-config.in
46
47 dll:
48         $(CXX) -shared -Wl,--output-def,libonig.def -o libonig.dll *.o \
49         $(LIBS)
50         strip libonig.dll
51
52 # Ruby TEST
53 rtest:
54         $(RUBYDIR)/ruby -w -Ke $(srcdir)/test.rb
55
56 # character-types-table source generator
57 mktable: $(encdir)/mktable.c $(srcdir)/regenc.h
58         $(CC) -I$(top_srcdir) -o mktable $(encdir)/mktable.c
59
60
61 # TEST
62 TESTS = testc testp testcu
63
64 check_PROGRAMS = testc testp testcu
65
66 atest: testc testp testcu
67         @echo "[Oniguruma API, ASCII/EUC-JP check]"
68         @$(top_builddir)/testc  | grep RESULT
69         @echo "[POSIX API, ASCII/EUC-JP check]"
70         @$(top_builddir)/testp  | grep RESULT
71         @echo "[Oniguruma API, UTF-16 check]"
72         @$(top_builddir)/testcu | grep RESULT
73
74 testc_SOURCES = testc.c
75 testc_LDADD = libonig.la
76
77 testp_SOURCES = testc.c
78 testp_LDADD = libonig.la
79 testp_CFLAGS = -DPOSIX_TEST
80
81 testcu_SOURCES = testu.c
82 testcu_LDADD = libonig.la
83
84
85 #testc.c: $(srcdir)/test.rb $(srcdir)/testconv.rb
86 #       ruby -Ke $(srcdir)/testconv.rb < $(srcdir)/test.rb > $@
87
88 #testu.c: $(srcdir)/test.rb $(srcdir)/testconvu.rb
89 #       ruby -Ke $(srcdir)/testconvu.rb $(srcdir)/test.rb > $@
90
91 #win32/testc.c: $(srcdir)/test.rb $(srcdir)/testconv.rb
92 #       ruby -Ke $(srcdir)/testconv.rb -win < $(srcdir)/test.rb | nkf -cs > $@
93
94 ## END OF FILE