summaryrefslogtreecommitdiffstats
path: root/botan/src/build-data/makefile/nmake.in
blob: 34c864e93615f50727dcd23b839ac3d1c0561393 (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
##################################################
# Compiler Options                               #
##################################################
CXX           = %{cc}
LIB_OPT       = %{lib_opt}
CHECK_OPT     = %{check_opt}
MACH_OPT      = %{mach_opt}
LANG_FLAGS    = %{lang_flags}
WARN_FLAGS    = %{warn_flags}
LINK_TO       = %{link_to}

##################################################
# Version Numbers                                #
##################################################
VERSION       = %{version}

##################################################
# Installation Settings                          #
##################################################
DESTDIR       = %{prefix}

LIBDIR        = $(DESTDIR)\%{libdir}
HEADERDIR     = $(DESTDIR)\%{includedir}\botan
DOCDIR        = $(DESTDIR)\%{docdir}\Botan-$(VERSION)

##################################################
# Aliases for Common Programs                    #
##################################################
AR            = %{ar_command}
CD            = @cd
ECHO          = @echo
INSTALL       = %{install_cmd_exec}
INSTALL_CMD   = %{install_cmd_exec}
MKDIR         = @md
MKDIR_INSTALL = @md
RM            = @del /Q
RMDIR         = @rmdir

##################################################
# File Lists                                     #
##################################################
CHECK         = check

DOCS          = %{doc_files}

HEADERS       = %{include_files}

LIBOBJS       = %{lib_objs}

CHECKOBJS     = %{check_objs}

LIB_FLAGS     = $(LIB_OPT) $(MACH_OPT) $(LANG_FLAGS) $(WARN_FLAGS)
CHECK_FLAGS   = $(CHECK_OPT) $(LANG_FLAGS) $(WARN_FLAGS)

LIBRARIES     = $(STATIC_LIB)

LIBNAME       = libbotan
STATIC_LIB    = $(LIBNAME).%{static_suffix}

all: $(LIBRARIES)

##################################################
# Build Commands                                 #
##################################################
%{lib_build_cmds}

%{check_build_cmds}

##################################################
# Link Commands                                  #
##################################################

# Link for Borland?
#ilink32 -L$(BCB)\lib -w -c -x -Gn -ap -Tpe c0x32.obj \
#    $(CHECKOBJS),check.exe,,$(LINK_TO) $(STATIC_LIB)

$(CHECK): $(LIBRARIES) $(CHECKOBJS)
	link /OUT:$@.exe $(CHECKOBJS) $(STATIC_LIB) $(LINK_TO)

$(STATIC_LIB): $(LIBOBJS)
	$(AR) /OUT:$@ /NAME:BOTAN-$(VERSION) $(LIBOBJS)

##################################################
# Misc Targets                                   #
##################################################
static: $(STATIC_LIB)

##################################################
# Fake Targets                                   #
##################################################
clean:
	$(RM) %{build_dir}\lib\* %{build_dir}\checks\*
	$(RM) $(LIBRARIES) $(CHECK)

distclean: clean
	$(RM) %{build_dir}\build.h
	$(RM) %{build_dir}\include\botan\*
	$(RMDIR) %{build_dir}\include\botan %{build_dir}\include
	$(RMDIR) %{build_dir}\lib %{build_dir}\checks
	$(RMDIR) %{build_dir}
	$(RM) Makefile

##################################################
# Install Commands                               #
##################################################
install: $(LIBRARIES)
	$(ECHO) "Install command not implemented"