Switch to krb5_enomem
[heimdal.git] / lib / kadm5 / NTMakefile
blob3afe8e899543473ea5b619d81271c3509c65035e
1 ########################################################################
3 # Copyright (c) 2009, Secure Endpoints Inc.
4 # All rights reserved.
5
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
8 # are met:
9
10 # - Redistributions of source code must retain the above copyright
11 #   notice, this list of conditions and the following disclaimer.
12
13 # - Redistributions in binary form must reproduce the above copyright
14 #   notice, this list of conditions and the following disclaimer in
15 #   the documentation and/or other materials provided with the
16 #   distribution.
17
18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22 # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
28 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 # POSSIBILITY OF SUCH DAMAGE.
30
32 RELDIR=lib\kadm5 
34 !include ../../windows/NTMakefile.w32 
36 dist_libkadm5clnt_la_SOURCES =  \
37         ad.c                    \
38         chpass_c.c              \
39         client_glue.c           \
40         common_glue.c           \
41         create_c.c              \
42         delete_c.c              \
43         destroy_c.c             \
44         flush_c.c               \
45         free.c                  \
46         get_c.c                 \
47         get_princs_c.c          \
48         init_c.c                \
49         kadm5_locl.h            \
50         marshall.c              \
51         modify_c.c              \
52         private.h               \
53         privs_c.c               \
54         randkey_c.c             \
55         rename_c.c              \
56         send_recv.c             \
57         kadm5-pwcheck.h         \
58         admin.h
60 dist_libkadm5srv_la_SOURCES =   \
61         acl.c                   \
62         admin.h                 \
63         bump_pw_expire.c        \
64         chpass_s.c              \
65         common_glue.c           \
66         context_s.c             \
67         create_s.c              \
68         delete_s.c              \
69         destroy_s.c             \
70         ent_setup.c             \
71         error.c                 \
72         flush_s.c               \
73         free.c                  \
74         get_princs_s.c          \
75         get_s.c                 \
76         init_s.c                \
77         kadm5_locl.h            \
78         keys.c                  \
79         log.c                   \
80         marshall.c              \
81         modify_s.c              \
82         password_quality.c      \
83         private.h               \
84         privs_s.c               \
85         randkey_s.c             \
86         rename_s.c              \
87         server_glue.c           \
88         set_keys.c              \
89         set_modifier.c          \
90         kadm5-pwcheck.h         \
91         admin.h
93 LIBKADM5CLNT_OBJS=                  \
94         $(OBJ)\ad.obj               \
95         $(OBJ)\chpass_c.obj         \
96         $(OBJ)\client_glue.obj      \
97         $(OBJ)\common_glue.obj      \
98         $(OBJ)\create_c.obj         \
99         $(OBJ)\delete_c.obj         \
100         $(OBJ)\destroy_c.obj        \
101         $(OBJ)\flush_c.obj          \
102         $(OBJ)\free.obj             \
103         $(OBJ)\get_c.obj            \
104         $(OBJ)\get_princs_c.obj     \
105         $(OBJ)\init_c.obj           \
106         $(OBJ)\marshall.obj         \
107         $(OBJ)\modify_c.obj         \
108         $(OBJ)\privs_c.obj          \
109         $(OBJ)\randkey_c.obj        \
110         $(OBJ)\rename_c.obj         \
111         $(OBJ)\send_recv.obj        \
112         $(OBJ)\kadm5_err.obj
114 LIBKADM5SRV_OBJS=                   \
115         $(OBJ)\acl.obj              \
116         $(OBJ)\bump_pw_expire.obj   \
117         $(OBJ)\chpass_s.obj         \
118         $(OBJ)\common_glue.obj      \
119         $(OBJ)\context_s.obj        \
120         $(OBJ)\create_s.obj         \
121         $(OBJ)\delete_s.obj         \
122         $(OBJ)\destroy_s.obj        \
123         $(OBJ)\ent_setup.obj        \
124         $(OBJ)\error.obj            \
125         $(OBJ)\flush_s.obj          \
126         $(OBJ)\free.obj             \
127         $(OBJ)\get_princs_s.obj     \
128         $(OBJ)\get_s.obj            \
129         $(OBJ)\init_s.obj           \
130         $(OBJ)\keys.obj             \
131         $(OBJ)\log.obj              \
132         $(OBJ)\marshall.obj         \
133         $(OBJ)\modify_s.obj         \
134         $(OBJ)\password_quality.obj \
135         $(OBJ)\privs_s.obj          \
136         $(OBJ)\randkey_s.obj        \
137         $(OBJ)\rename_s.obj         \
138         $(OBJ)\server_glue.obj      \
139         $(OBJ)\set_keys.obj         \
140         $(OBJ)\set_modifier.obj     \
141         $(OBJ)\kadm5_err.obj
144 proto_opts = -q -R "^(_|kadm5_c_|kadm5_s_|kadm5_log)" -P remove
146 $(OBJ)\kadm5-protos.h: $(dist_libkadm5srv_la_SOURCES) $(dist_libkadm5clnt_la_SOURCES)
147         $(PERL) ..\..\cf\make-proto.pl $(proto_opts) \
148                 -o $@ \
149                 $(dist_libkadm5srv_la_SOURCES) \
150                 $(dist_libkadm5clnt_la_SOURCES) \
151         || $(RM) $@
153 $(OBJ)\kadm5-private.h: $(dist_libkadm5srv_la_SOURCES) $(dist_libkadm5clnt_la_SOURCES)
154         $(PERL) ..\..\cf\make-proto.pl $(proto_opts) \
155                 -p $@ \
156                 $(dist_libkadm5srv_la_SOURCES) \
157                 $(dist_libkadm5clnt_la_SOURCES) \
158         || $(RM) $@
160 $(OBJ)\iprop-commands.c $(OBJ)\iprop-commands.h: iprop-commands.in
161         cd $(OBJ)
162         $(CP) $(SRCDIR)\iprop-commands.in $(OBJ)
163         $(BINDIR)\slc.exe iprop-commands.in
164         cd $(SRCDIR)
166 $(OBJ)\kadm5_err.h $(OBJ)kadm5_err.c: kadm5_err.et
167         cd $(OBJ)
168         $(BINDIR)\compile_et.exe $(SRCDIR)\kadm5_err.et
169         cd $(SRCDIR)
171 $(KADM5INCDIR)\kadm5_err.h: $(OBJ)\kadm5_err.h
173 KADM5INCDIR=$(INCDIR)\kadm5
175 INCFILES=\
176         $(KADM5INCDIR)\kadm5_err.h      \
177         $(KADM5INCDIR)\admin.h  \
178         $(KADM5INCDIR)\private.h        \
179         $(KADM5INCDIR)\kadm5-protos.h   \
180         $(KADM5INCDIR)\kadm5-private.h  \
181         $(OBJ)\iprop-commands.h
183 SBINPROGRAMS=$(SBINDIR)\iprop-log.exe
185 LIBEXECPROGRAMS=$(LIBEXECDIR)\ipropd-master.exe $(LIBEXECDIR)\ipropd-slave.exe
187 EXELIBDEPS= \
188         $(LIBKADM5SRV) \
189         $(LIBROKEN) \
190         $(LIBHEIMDAL) \
191         $(LIBHDB) \
192         $(LIBSQLITE) \
193         $(LIBSL) \
194         $(LIBCOMERR) \
195         $(LIBVERS)
197 $(SBINDIR)\iprop-log.exe: $(OBJ)\iprop-log.obj $(OBJ)\iprop-commands.obj $(EXELIBDEPS) \
198                 $(OBJ)\iprop-log-version.res
199         $(EXECONLINK)
200         $(EXEPREP)
202 $(LIBEXECDIR)\ipropd-master.exe: $(OBJ)\ipropd_master.obj $(OBJ)\ipropd_common.obj \
203                 $(EXELIBDEPS) $(OBJ)\ipropd-master-version.res
204         $(EXECONLINK)
205         $(EXEPREP)
207 $(LIBEXECDIR)\ipropd-slave.exe: $(OBJ)\ipropd_slave.obj $(OBJ)\ipropd_common.obj \
208                 $(EXELIBDEPS) $(OBJ)\ipropd-slave-version.res
209         $(EXECONLINK)
210         $(EXEPREP)
212 $(LIBKADM5CLNT): $(LIBKADM5CLNT_OBJS)
213         $(LIBCON)
215 LIBKADM5SRVRES=$(OBJ)\libkadm5srv-version.res
217 $(LIBKADM5SRV): $(BINDIR)\libkadm5srv.dll
219 $(BINDIR)\libkadm5srv.dll: $(LIBKADM5SRV_OBJS) $(LIBHEIMDAL) $(LIBROKEN) $(LIBHDB) $(LIBCOMERR) $(LIBSQLITE) $(LIBKADM5SRVRES)
220         $(DLLGUILINK) -implib:$(LIBKADM5SRV) -def:libkadm5srv-exports.def
221         $(DLLPREP)
223 all:: $(INCFILES) $(LIBKADM5SRV) $(LIBKADM5CLNT)
225 all-tools:: $(SBINPROGRAMS) $(LIBEXECPROGRAMS)
227 clean::
228         -$(RM) $(INCFILES)
229         -$(RM) $(LIBKADM5CLNT)
230         -$(RM) $(LIBKADM5SRV)
231         -$(RM) $(BINDIR)\libkadm5srv.*
232         -$(RM) $(SBINPROGRAMS:.exe=.*)
233         -$(RM) $(LIBEXECPROGRAMS:.exe=.*)
235 test:: test-binaries test-run
237 test-binaries:  \
238         $(OBJ)\default_keys.exe \
239         $(OBJ)\test_pw_quality.exe \
240         $(OBJ)\sample_passwd_check.dll
242 $(OBJ)\default_keys.exe: $(OBJ)\default_keys.obj $(LIBHEIMDAL) $(LIBROKEN) $(LIBHDB)
243         $(EXECONLINK)
244         $(EXEPREP_NODIST)
246 $(OBJ)\test_pw_quality.exe: $(OBJ)\test_pw_quality.obj  \
247         $(LIBROKEN) $(LIBKADM5SRV) $(LIBVERS) $(LIBHEIMDAL)
248         $(EXECONLINK)
249         $(EXEPREP_NODIST)
251 $(OBJ)\sample_passwd_check.dll: $(OBJ)\sample_passwd_check.obj $(LIBHEIMDAL)
252         $(DLLGUILINK) /DEF:<<
253 EXPORTS
254         version DATA
255         check_length
257         $(DLLPREP_NODIST)
259 test-run:
261 {$(OBJ)}.h{$(KADM5INCDIR)}.h:
262         $(CP) $< $@
264 {}.h{$(KADM5INCDIR)}.h:
265         $(CP) $< $@
267 {}.c{$(OBJ)}.obj::
268         $(C2OBJ_P) -I$(OBJ) -I$(KADM5INCDIR)
270 test-exports:
271         $(PERL) ..\..\cf\w32-check-exported-symbols.pl --vs version-script.map --def libkadm5srv-exports.def
273 test:: test-exports