Remove building with NOCRYPTO option
[minix.git] / crypto / external / bsd / heimdal / dist / lib / hdb / NTMakefile
blobef696fb3a93c008447e3ef41e9883bc19c273a0c
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\hdb
34 !include ../../windows/NTMakefile.w32 
36 gen_files_hdb = $(OBJ)\asn1_hdb_asn1.x
38 $(gen_files_hdb) $(OBJ)\hdb_asn1.hx $(OBJ)\hdb_asn1-priv.hx: $(BINDIR)\asn1_compile.exe hdb.asn1
39         cd $(OBJ)
40         $(BINDIR)\asn1_compile.exe --sequence=HDB-Ext-Keyset --sequence=Keys --one-code-file $(SRCDIR)\hdb.asn1 hdb_asn1
41         cd $(SRCDIR)
43 $(gen_files_hdb:.x=.c): $$(@R).x
45 !ifdef OPENLDAP_MODULE
47 ldap_dll = $(BINDIR)\hdb_ldap.dll
48 ldap_lib = $(LIBDIR)\hdb_ldap.lib
49 ldap_objs = $(OBJ)\hdb-ldap.obj
51 $(ldap_dll): $(ldap_objs)
52         $(DLLGUILINK) -implib:$(ldap_lib)
53         $(DLLPREP)
55 clean::
56         -$(RM) $(ldap_dll)
57         -$(RM) $(ldap_lib)
59 !else
61 ldap = $(OBJ)\hdb-ldap.obj
62 ldap_c = hdb-ldap.c
64 !endif
66 dist_libhdb_la_SOURCES =                        \
67         common.c                                \
68         db.c                                    \
69         db3.c                                   \
70         ext.c                                   \
71         $(ldap_c)                               \
72         hdb.c                                   \
73         hdb-sqlite.c                            \
74         hdb-keytab.c                            \
75         hdb-mitdb.c                             \
76         hdb_locl.h                              \
77         keys.c                                  \
78         keytab.c                                \
79         dbinfo.c                                \
80         mkey.c                                  \
81         ndbm.c                                  \
82         print.c
84 libhdb_OBJs = \
85         $(OBJ)\common.obj       \
86         $(OBJ)\db.obj           \
87         $(OBJ)\db3.obj          \
88         $(OBJ)\ext.obj          \
89         $(ldap)                 \
90         $(OBJ)\hdb.obj          \
91         $(OBJ)\hdb-sqlite.obj   \
92         $(OBJ)\hdb-keytab.obj   \
93         $(OBJ)\hdb-mitdb.obj    \
94         $(OBJ)\keys.obj         \
95         $(OBJ)\keytab.obj       \
96         $(OBJ)\dbinfo.obj       \
97         $(OBJ)\mkey.obj         \
98         $(OBJ)\ndbm.obj         \
99         $(OBJ)\print.obj        \
100         $(gen_files_hdb:.x=.obj)        \
101         $(OBJ)\hdb_err.obj
103 $(OBJ)\hdb_err.c $(OBJ)\hdb_err.h: hdb_err.et
104         cd $(OBJ)
105         $(BINDIR)\compile_et.exe $(SRCDIR)\hdb_err.et
106         cd $(SRCDIR)
108 $(OBJ)\hdb-protos.h: $(dist_libhdb_la_SOURCES)
109         $(PERL) ../../cf/make-proto.pl -q -P remove -o $@ $(dist_libhdb_la_SOURCES) \
110                 || $(RM) $@
112 $(OBJ)\hdb-private.h: $(dist_libhdb_la_SOURCES)
113         $(PERL) ../../cf/make-proto.pl -q -P remote -p $@ $(dist_libhdb_la_SOURCES) \
114                 || $(RM) $@
116 INCFILES=                       \
117         $(INCDIR)\hdb.h         \
118         $(INCDIR)\hdb-protos.h  \
119         $(OBJ)\hdb-private.h    \
120         $(INCDIR)\hdb_err.h     \
121         $(INCDIR)\hdb_asn1.h    \
122         $(INCDIR)\hdb_asn1-priv.h
124 !ifndef STATICLIBS
126 RES=$(OBJ)\libhdb-version.res
128 $(LIBHDB): $(BINDIR)\libhdb.dll
130 $(BINDIR)\libhdb.dll: $(libhdb_OBJs) $(ldap_lib) $(LIBHEIMDAL) $(LIBSQLITE) $(LIBCOMERR) $(LIBROKEN) $(RES)
131         $(DLLGUILINK) -def:libhdb-exports.def -implib:$(LIBHDB)
132         $(DLLPREP)
134 clean::
135         -$(RM) $(BINDIR)\libhdb.*
137 !else
139 $(LIBHDB): $(libhdb_OBJs) $(ldap_lib)
140         $(LIBCON)
142 !endif
144 all:: $(INCFILES) $(LIBHDB)
146 clean::
147         -$(RM) $(INCFILES)
148         -$(RM) $(LIBHDB)
150 test:: test-binaries test-run
152 test-binaries: $(OBJ)\test_dbinfo.exe $(OBJ)\test_hdbkeys.exe
154 $(OBJ)\test_dbinfo.exe: $(OBJ)\test_dbinfo.obj $(LIBHDB) $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS)
155         $(EXECONLINK)
156         $(EXEPREP_NODIST)
158 $(OBJ)\test_hdbkeys.exe: $(OBJ)\test_hdbkeys.obj $(LIBHDB) $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS)
159         $(EXECONLINK)
160         $(EXEPREP_NODIST)
162 test-run:
163         cd $(OBJ)
164         test_dbinfo.exe
165         cd $(SRCDIR)
167 !ifdef OPENLDAP_INC
168 openldap_inc_flag=-I$(OPENLDAP_INC)
169 !else
170 openldap_inc_flag=
171 !endif
173 hdb_cflags=$(openldap_inc_flag) -I$(OBJ)
175 {}.c{$(OBJ)}.obj::
176         $(C2OBJ_P) $(hdb_cflags) -DASN1_LIB
178 {$(OBJ)}.c{$(OBJ)}.obj::
179         $(C2OBJ_P) $(hdb_cflags)
181 test-exports:
182         $(PERL) ..\..\cf\w32-check-exported-symbols.pl --vs version-script.map --def libhdb-exports.def
184 test:: test-exports