summaryrefslogtreecommitdiffstats
path: root/lib/libsi18n/Makefile
blob: 9b1c9c2e870b6c0a8b9d0fb05ea705ba9ee595e2 (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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#
# BEGIN COPYRIGHT BLOCK
# Copyright 2001 Sun Microsystems, Inc.
# Portions copyright 1999, 2001-2003 Netscape Communications Corporation.
# All rights reserved.
# END COPYRIGHT BLOCK
#
# The libsi18n library support for getting strings from the
# string database.

MCOM_ROOT=../../..
MODULE=LibsI18N
include ../../nsdefs.mk

NSDEFS_PRODUCT = $(NS_PRODUCT)

OBJDEST=$(OBJDIR)/lib/libsi18n

L10NDIR = $(MCOM_ROOT)/ldapserver/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), HTTP_ENTERPRISE)
StringDatabase = ns-httpd.db
L10N_SERVER = httpd
DBTheaders = \
        ../../httpd/src/dbthttpd.h \
        ../../include/base/dbtbase.h \
        ../../include/frame/dbtframe.h \
        ../../include/httpdaemon/dbthttpdaemon.h \
        ../../include/libaccess/dbtlibaccess.h \
        ../../include/libadmin/dbtlibadmin.h \
        ../../include/libir/dbtlibir.h \
        gshttpd.h
endif

ifeq ($(BUILD_MODULE), DIRECTORY)
 StringDatabase = ns-slapd.properties
 DBTheaders = \
    ../../httpd/src/dbthttpd.h \
    ../../include/base/dbtbase.h \
    ../../include/frame/dbtframe.h \
    ../../include/httpdaemon/dbthttpdaemon.h \
    ../../include/libaccess/dbtlibaccess.h \
    ../../include/libadmin/dbtlibadmin.h \
    ../../include/libir/dbtlibir.h \
    ../../ldap/clients/dsgw/dbtdsgw.h \
    gsslapd.h
 endif


ifeq ($(BUILD_MODULE), HTTP_PERSONAL)
StringDatabase = ns-httpd.db
L10N_SERVER = httpd
DBTheaders = \
        ../../httpd/src/dbthttpd.h \
        ../../include/base/dbtbase.h \
        ../../include/frame/dbtframe.h \
        ../../include/httpdaemon/dbthttpdaemon.h \
        ../../include/libaccess/dbtlibaccess.h \
        ../../include/libadmin/dbtlibadmin.h \
        gshttpd.h
endif

ifeq ($(BUILD_MODULE), HTTP_PROXY)
StringDatabase = ns-proxy.db
DBTheaders = \
        ../../httpd/src/dbthttpd.h \
        ../../include/base/dbtbase.h \
        ../../include/frame/dbtframe.h \
        ../../include/httpdaemon/dbthttpdaemon.h \
        ../../include/libaccess/dbtlibaccess.h \
        ../../include/libadmin/dbtlibadmin.h \
        gsproxy.h
endif

ifeq ($(BUILD_MODULE), HTTP_ADMIN)
StringDatabase = ns-admin.db
L10N_SERVER = admserv
DBTheaders = \
        ../../admserv/src/dbtadmserv.h \
        ../../admserv/cgi-src/dbtcgiadmin.h \
        ../../admserv/user-forms/src/dbtuserforms.h \
        ../../include/base/dbtbase.h \
        ../../include/frame/dbtframe.h \
        ../../include/httpdaemon/dbthttpdaemon.h \
        ../../include/libaccess/dbtlibaccess.h \
        ../../include/libadmin/dbtlibadmin.h \
        ../../include/libir/dbtlibir.h \
        gsadmserv.h
endif

include ../../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) $@