summaryrefslogtreecommitdiffstats
path: root/lib/libsi18n/Makefile
blob: 228f0e8f96c6be55edff8b436db7f9db9a387196 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#
# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
# Copyright (C) 2005 Red Hat, Inc.
# All rights reserved.
# END COPYRIGHT BLOCK
#
# The libsi18n library support for getting strings from the
# string database.

BUILD_ROOT=../..
MODULE=LibsI18N
include $(BUILD_ROOT)/nsdefs.mk

NSDEFS_PRODUCT = $(NS_PRODUCT)

OBJDEST=$(OBJDIR)/lib/libsi18n

L10NDIR = $(BUILD_ROOT)/l10n

ifeq ($(ARCH), WINNT)
CCOUT0=  /Fo
CCOUT1=  /Fe
LIBS=$(OBJDIR)/lib/libsi18n.lib
ifeq ($(BSCINFO), yes)
BSCS=$(OBJDIR)/lib/libsi18n.bsc
endif
else
LIBS=$(OBJDIR)/lib/libsi18n.a
CCOUT0=  -o 
CCOUT1=  -o 
endif

ifeq ($(ARCH), IRIX)
 ifeq ($(USE_N32), 1)
  MYLDFLAG = -n32
 else
  MYLDFLAG =
 endif
else
 MYLDFLAG =
endif

ifeq ($(USE_64), 1)
ifeq ($(ARCH), HPUX)
  MYLDFLAG = +DA2.0W
endif
ifeq ($(ARCH), SOLARIS)
  MYLDFLAG = -xarch=v9 
endif
endif

ifeq ($(BUILD_MODULE), DIRECTORY)
 StringDatabase = ns-slapd.properties
 DBTheaders = \
    ../../include/base/dbtbase.h \
    ../../include/libaccess/dbtlibaccess.h \
    ../../include/libadmin/dbtlibadmin.h \
    ../../ldap/clients/dsgw/dbtdsgw.h \
    gsslapd.h
 endif

include $(BUILD_ROOT)/nsconfig.mk

MCC_INCLUDE += $(ADMINUTIL_INCLUDE)

all: $(OBJDEST) $(LIBS) $(BSCS) $(OBJDEST)/$(StringDatabase)

$(OBJDEST)/$(StringDatabase): makstrdb.c ../../include/i18n.h $(DBTheaders)
	@echo "Building String Database for $(BUILD_MODULE) in"
	@echo "$(OBJDEST)/$(StringDatabase)"
	$(CC) -g $(CFLAGS) $(MCC_INCLUDE) -c makstrdb.c \
		$(CCOUT0)$(OBJDEST)/makstrdb.o
	$(CC) $(MYLDFLAG) -g $(OBJDEST)/makstrdb.o \
		$(CCOUT1)$(OBJDEST)/makstrdb.exe
	cd $(OBJDEST); ./makstrdb.exe
	rm $(OBJDEST)/makstrdb.exe

$(OBJDEST):
	mkdir -p $(OBJDEST)

OBJS = 	\
	$(OBJDEST)/acclanglist.o \
	$(OBJDEST)/getstrprop.o \
	$(OBJDEST)/getlang.o \
	$(OBJDEST)/coreres.o \
	$(OBJDEST)/txtfile.o \
	$(OBJDEST)/propset.o \
	$(OBJDEST)/reshash.o



$(LIBS): $(OBJS)
	rm -f $@
	$(AR) $(OBJS)
	$(RANLIB) $@