NTMakefile revision 1.1 1 1.1 elric ########################################################################
2 1.1 elric #
3 1.1 elric # Copyright (c) 2009, Secure Endpoints Inc.
4 1.1 elric # All rights reserved.
5 1.1 elric #
6 1.1 elric # Redistribution and use in source and binary forms, with or without
7 1.1 elric # modification, are permitted provided that the following conditions
8 1.1 elric # are met:
9 1.1 elric #
10 1.1 elric # - Redistributions of source code must retain the above copyright
11 1.1 elric # notice, this list of conditions and the following disclaimer.
12 1.1 elric #
13 1.1 elric # - Redistributions in binary form must reproduce the above copyright
14 1.1 elric # notice, this list of conditions and the following disclaimer in
15 1.1 elric # the documentation and/or other materials provided with the
16 1.1 elric # distribution.
17 1.1 elric #
18 1.1 elric # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 1.1 elric # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 1.1 elric # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21 1.1 elric # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22 1.1 elric # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23 1.1 elric # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24 1.1 elric # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 1.1 elric # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26 1.1 elric # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 1.1 elric # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
28 1.1 elric # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 1.1 elric # POSSIBILITY OF SUCH DAMAGE.
30 1.1 elric #
31 1.1 elric
32 1.1 elric RELDIR=include
33 1.1 elric
34 1.1 elric SUBDIRS=kadm5 hcrypto gssapi
35 1.1 elric
36 1.1 elric !include ../windows/NTMakefile.w32
37 1.1 elric !include ../windows/NTMakefile.config
38 1.1 elric
39 1.1 elric INCFILES= \
40 1.1 elric $(INCDIR)\config.h \
41 1.1 elric $(INCDIR)\crypto-headers.h \
42 1.1 elric $(INCDIR)\heim_threads.h \
43 1.1 elric $(INCDIR)\krb5-types.h \
44 1.1 elric $(INCDIR)\version.h
45 1.1 elric
46 1.1 elric $(INCDIR)\krb5-types.h: $(OBJ)\bits.exe
47 1.1 elric $(OBJ)\bits.exe $(INCDIR)\krb5-types.h
48 1.1 elric
49 1.1 elric $(OBJ)\bits.exe: $(OBJ)\bits.obj
50 1.1 elric $(EXECONLINK)
51 1.1 elric $(EXEPREP_NODIST)
52 1.1 elric
53 1.1 elric $(INCDIR)\config.h: config.h.w32 ..\windows\NTMakefile.config NTMakefile
54 1.1 elric $(PERL) << < config.h.w32 > $@
55 1.1 elric
56 1.1 elric while(<>) {
57 1.1 elric
58 1.1 elric if (m/\@FEATURE_DEFS\@/) {
59 1.1 elric
60 1.1 elric if ("$(KRB5)") { print "#define KRB5 1\n"; }
61 1.1 elric if ("$(KRB4)") { print "#define KRB4 1\n"; }
62 1.1 elric if ("$(WEAK_CRYPTO)") { print "#define HEIM_WEAK_CRYPTO 1\n"; }
63 1.1 elric if ("$(PKINIT)") { print "#define PKINIT 1\n"; }
64 1.1 elric if ("$(NO_AFS)") { print "#define NO_AFS 1\n"; }
65 1.1 elric if ("$(OPENLDAP)") { print "#define OPENLDAP 1\n"; }
66 1.1 elric if ("$(OPENLDAP_MODULE)") { print "#define OPENLDAP_MODULE 1\n"; }
67 1.1 elric if ("$(OTP)") { print "#define OTP 1 \n"; }
68 1.1 elric if ("$(AUTHENTICATION)") { print "#define AUTHENTICATION 1\n"; }
69 1.1 elric if ("$(DIAGNOSTICS)") { print "#define DIAGNOSTICS 1\n"; }
70 1.1 elric if ("$(ENCRYPTION)") { print "#define ENCRYPTION 1\n"; }
71 1.1 elric if ("$(ENABLE_AFS_STRING_TO_KEY)") { print "#define ENABLE_AFS_STRING_TO_KEY 1\n"; }
72 1.1 elric if ("$(ENABLE_PTHREAD_SUPPORT)") { print "#define ENABLE_PTHREAD_SUPPORT 1\n"; }
73 1.1 elric if ("$(HAVE_PTHREAD_H)") { print "#define HAVE_PTHREAD_H 1\n"; }
74 1.1 elric if ("$(ENV_HACK)") { print "#define ENV_HACK 1\n"; }
75 1.1 elric if ("$(HAVE_KCM)") { print "#define HAVE_KCM 1\n"; }
76 1.1 elric if ("$(HAVE_SCC)") { print "#define HAVE_SCC 1\n"; }
77 1.1 elric if ("$(DIR_hdbdir)") { print "#define HDB_DB_DIR \"".'$(DIR_hdbdir)'."\"\n"; }
78 1.1 elric if ("$(HAVE_MSLSA_CACHE)") { print "#define HAVE_MSLSA_CACHE 1\n"; }
79 1.1 elric
80 1.1 elric } elsif (m/\@VERSION_OPTDEFS\@/) {
81 1.1 elric
82 1.1 elric if ("$(VER_PRERELEASE)") { print "#define VER_PRERELEASE 1\n"; }
83 1.1 elric if ("$(VER_PRIVATE)") { print "#define VER_PRIVATE \"$(VER_PRIVATE)\"\n"; }
84 1.1 elric if ("$(VER_SPECIAL)") { print "#define VER_SPECIAL \"$(VER_SPECIAL)\"\n"; }
85 1.1 elric if ("$(BUILD)" =~ "dbg") { print "#define VER_DEBUG 1\n"; }
86 1.1 elric print "#define HOST \"$(COMPUTERNAME)\"\n";
87 1.1 elric
88 1.1 elric } else {
89 1.1 elric
90 1.1 elric s/\@PACKAGE\@/$(VER_PACKAGE)/;
91 1.1 elric s/\@PACKAGE_NAME\@/$(VER_PACKAGE_NAME)/;
92 1.1 elric s/\@PACKAGE_BUGREPORT\@/$(VER_PACKAGE_BUGREPORT:@=\@)/;
93 1.1 elric s/\@PACKAGE_VERSION\@/$(VER_PACKAGE_VERSION)/;
94 1.1 elric s/\@PACKAGE_COPYRIGHT\@/$(VER_PACKAGE_COPYRIGHT)/;
95 1.1 elric s/\@PACKAGE_COMPANY\@/$(VER_PACKAGE_COMPANY)/;
96 1.1 elric s/\@MAJOR\@/$(VER_PRODUCT_MAJOR)/;
97 1.1 elric s/\@MINOR\@/$(VER_PRODUCT_MINOR)/;
98 1.1 elric s/\@AUX\@/$(VER_PRODUCT_AUX)/;
99 1.1 elric s/\@PATCH\@/$(VER_PRODUCT_PATCH)/;
100 1.1 elric
101 1.1 elric print $_;
102 1.1 elric }
103 1.1 elric }
104 1.1 elric
105 1.1 elric <<
106 1.1 elric
107 1.1 elric $(INCDIR)\version.h: ..\windows\NTMakefile.config NTMakefile
108 1.1 elric $(CP) << $@
109 1.1 elric const char *heimdal_long_version = "@(#)$$Version: $(VER_PACKAGE_NAME) $(VER_PACKAGE_VERSION) by $(USERNAME) on $(COMPUTERNAME) ($(CPU)-pc-windows) $$";
110 1.1 elric const char *heimdal_version = "$(VER_PACKAGE_NAME) $(VER_PACKAGE_VERSION)";
111 1.1 elric <<
112 1.1 elric
113 1.1 elric all:: $(INCFILES)
114 1.1 elric
115 1.1 elric clean::
116 1.1 elric -$(RM) $(INCFILES)
117 1.1 elric
118