1 ########################################################################
3 # Copyright (c) 2009-2017, Secure Endpoints Inc.
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
10 # - Redistributions of source code must retain the above copyright
11 # notice, this list of conditions and the following disclaimer.
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
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.
34 localcflags=-DASN1_LIB
36 !include ../../windows/NTMakefile.w32
42 $(OBJ)\collector.obj \
44 $(OBJ)\crypto-ec.obj \
48 $(OBJ)\hx509_err.obj \
59 $(OBJ)\ks_keychain.obj \
68 $(LIBHX509): $(libhx509_la_OBJS)
71 dist_libhx509_la_SOURCES = \
75 $(SRCDIR)\collector.c \
77 $(SRCDIR)\crypto-ec.c \
86 $(SRCDIR)\sel-gram.y \
95 $(SRCDIR)\ks_keychain.c \
100 $(SRCDIR)\softp11.c \
101 $(SRCDIR)\ref\pkcs11.h \
106 $(C2OBJ_P) -DBUILD_HX509_LIB -DASN1_LIB
108 {$(OBJ)}.c{$(OBJ)}.obj::
109 $(C2OBJ_P) -DBUILD_HX509_LIB -DASN1_LIB
111 asn1_compile=$(BINDIR)\asn1_compile.exe
115 $(INCDIR)\hx509-protos.h \
116 $(INCDIR)\hx509-private.h \
117 $(INCDIR)\hx509_err.h
119 hxtool.c: $(OBJ)\hxtool-commands.h
121 SLC=$(BINDIR)\slc.exe
123 $(OBJ)\hxtool-commands.c $(OBJ)\hxtool-commands.h: hxtool-commands.in $(SLC)
125 $(CP) $(SRCDIR)\hxtool-commands.in $(OBJ)\hxtool-commands.in
126 $(SLC) hxtool-commands.in
129 $(BINDIR)\hxtool.exe: $(OBJ)\tool\hxtool.obj $(OBJ)\tool\hxtool-commands.obj $(LIBHEIMDAL) $(OBJ)\hxtool-version.res
130 $(EXECONLINK) $(LIBHEIMDAL) $(LIBROKEN) $(LIBSL) $(LIBVERS) $(LIBCOMERR) $(LIB_openssl_crypto)
133 $(OBJ)\hx509-protos.h:
135 $(PERL) $(SRCDIR)\..\..\cf\make-proto.pl -R "^(_|^C)" -E HX509_LIB -q -P remove -o hx509-protos.h $(dist_libhx509_la_SOURCES) || $(RM) -f hx509-protos.h
138 $(OBJ)\hx509-private.h:
140 $(PERL) $(SRCDIR)\..\..\cf\make-proto.pl -q -P remove -p hx509-private.h $(dist_libhx509_la_SOURCES) || $(RM) -f hx509-private.h
143 $(OBJ)\hx509_err.c $(OBJ)\hx509_err.h: hx509_err.et
145 $(BINDIR)\compile_et.exe $(SRCDIR)\hx509_err.et
148 $(OBJ)\sel-gram.obj: $(OBJ)\sel-gram.c
151 $(OBJ)\sel-lex.obj: $(OBJ)\sel-lex.c
152 $(C2OBJ) -I$(SRCDIR) -I$(OBJ) -DYY_NO_UNISTD_H
154 $(OBJ)\sel-gram.c: sel-gram.y
155 $(YACC) -o $@ --defines=$(OBJ)\sel-gram.h sel-gram.y
157 $(OBJ)\sel-lex.c: sel-lex.l
158 $(LEX) -P_hx509_sel_yy -o$@ sel-lex.l
160 all:: $(INCFILES) $(LIBHX509)
165 ! if !exist($(OBJ)\tool)
169 all-tools:: $(BINDIR)\hxtool.exe
172 -$(RM) $(BINDIR)\hxtool.*
173 -$(RM) $(OBJ)\tool\*.*
175 {}.c{$(OBJ)\tool}.obj::
176 $(C2OBJ_C) /Fd$(OBJ)\tool\ /Fo$(OBJ)\tool\ $(MPOPT) /UASN1_LIB $<
178 {$(OBJ)}.c{$(OBJ)\tool}.obj::
179 $(C2OBJ_C) /Fd$(OBJ)\tool\ /Fo$(OBJ)\tool\ $(MPOPT) /UASN1_LIB $<