1include ../config.mk
2
3NAME=r_util
4CFLAGS+=-DR2_PLUGIN_INCORE -I$(TOP)/shlr
5PCLIBS=@LIBZIP@ @DL_LIBS@
6
7ifneq ($(OSTYPE),darwin)
8ifneq ($(OSTYPE),haiku)
9LDFLAGS+=-lm
10LINK=-lm
11endif
12endif
13
14OBJS=binheap.o mem.o unum.o str.o hex.o file.o range.o charset.o
15OBJS+=prof.o cache.o sys.o buf.o w32-sys.o ubase64.o base85.o base91.o
16OBJS+=list.o flist.o chmod.o graph.o event.o alloc.o donut.o print_code.o
17OBJS+=regex/regcomp.o regex/regerror.o regex/regexec.o uleb128.o
18OBJS+=sandbox.o calc.o thread.o thread_sem.o thread_lock.o thread_cond.o
19OBJS+=strpool.o bitmap.o time.o format.o pie.o print.o utype.o
20OBJS+=seven.o randomart.o zip.o debruijn.o log.o getopt.o table.o
21OBJS+=utf8.o utf16.o utf32.o strbuf.o lib.o name.o spaces.o signal.o syscmd.o
22OBJS+=udiff.o bdiff.o stack.o queue.o tree.o idpool.o assert.o
23OBJS+=punycode.o pkcs7.o x509.o asn1.o astr.o json_parser.o json_indent.o skiplist.o
24OBJS+=pj.o rbtree.o intervaltree.o qrcode.o vector.o skyline.o str_constpool.o str_trim.o
25OBJS+=ascii_table.o protobuf.o graph_drawable.o
26OBJS+=annotated_code.o
27
28ifeq (${HAVE_LIB_GMP},1)
29  OBJS+=big-gmp.o
30else
31  ifeq (${HAVE_LIB_SSL},1)
32    OBJS+=big-ssl.o
33  else
34    OBJS+=big.o
35  endif
36endif
37
38include deps.mk
39
40CWD=$(shell pwd)
41
42LDFLAGS+=${BN_LIBS}
43LDFLAGS+=${TH_LIBS}
44LDFLAGS+=${DL_LIBS}
45LDFLAGS+=-lm
46
47# NetBSD 7.0 ships with backtrace(3) in -lexecinfo
48ifeq (${BUILD_OS},netbsd)
49ifneq ($(shell expr "`uname -r`" : '[0-6]\.'), 2)
50  LDFLAGS+=-lexecinfo
51endif
52endif
53
54# FreeBSD 10.0 ships with backtrace(3) in -lexecinfo
55ifeq (${HOST_OS},freebsd)
56ifneq ($(shell expr "`uname -r`" : '[0-9]\.'), 2)
57  LDFLAGS+=-lexecinfo
58endif
59endif
60
61ifeq (${BUILD_OS},dragonfly)
62  LDFLAGS+=-lexecinfo
63endif
64
65ifeq (${BUILD_OS},haiku)
66  LDFLAGS+=-lexecinfo
67endif
68
69EXTRA_PRE+=spp_config
70EXTRA_PRE+=charsets
71
72include ../rules.mk
73include sdb.mk
74include spp.mk
75
76charsets:
77	$(MAKE) -C d
78.PHONY: charsets
79
80sync-regex regex-sync:
81	-rm -rf src/
82	cvs -qd anoncvs@anoncvs.ca.openbsd.org:/cvs get -P src/lib/libc/regex
83	cp src/lib/libc/regex/* regex
84