citrus: iconv support for static binaries
[dragonfly.git] / lib / libc / citrus / Makefile.inc
1 # $DragonFly: src/lib/libc/citrus/Makefile.inc,v 1.1 2005/03/11 23:33:53 joerg Exp $
2
3 .PATH: ${.CURDIR}/../libc/citrus
4
5 .include "../../i18n_module/Makefile.shlib"
6
7 CFLAGS+=        -DI18NMODULE_MAJOR=${MODULE_SHLIB_MAJOR} -D_I18N_DYNAMIC
8 STATIC_LOCALES?=
9
10 SRCS+=  citrus_bcs.c citrus_csmapper.c citrus_ctype.c citrus_ctype_fallback.c
11 SRCS+=  citrus_db.c citrus_db_hash.c citrus_esdb.c citrus_hash.c
12 SRCS+=  citrus_iconv.c citrus_lookup.c citrus_mapper.c citrus_memstream.c
13 SRCS+=  citrus_mmap.c citrus_module.c citrus_none.c citrus_stdenc.c
14 SRCS+=  citrus_prop.c
15
16 # Add the locale modules to compile-in in the static libc.a (and libc_p.a)
17 # If a new locale module is added, the includes and the table in
18 # citrus_module.c must be updated.
19 # A new module must have the file name citrus_xxx.c where xxx is the lower
20 # case name of the module.
21 # Currently the modules specified by STATIC_LOCALES are included in the
22 # shared libc (but never used). This is a bug.
23 .if ${STATIC_LOCALES} != ""
24 .PATH: ${.CURDIR}/../libc/citrus/modules
25 CFLAGS+=-I${.CURDIR}/../libc/citrus
26 CFLAGS+=-D_I18N_STATIC
27 .for var in ${STATIC_LOCALES}
28 SRCS+= citrus_${var:L}.c
29 CFLAGS+=-D_I18N_STATIC_${var}
30 .endfor
31 # iconv support
32 SRCS+=citrus_iconv_std.c citrus_mapper_std.c citrus_mapper_serial.c
33 .endif # STATIC_LOCALES