aboutsummaryrefslogtreecommitdiffstats
path: root/src/build-data/makefile/nmake.in
blob: f45690d06a2ed1d565e32d7a651950c5dd7902f3 (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
%{header_in}

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

### Library targets
LIBOBJS       = %{lib_objs}

APPOBJS       = %{app_objs}

TESTOBJS      = %{test_objs}

LIBNAME       = botan

LIBRARIES     = $(BOTAN_LIB)

# This will be either a static lib or the DLL import lib
BOTAN_LIB     = $(LIBNAME).%{static_suffix}

# Build Commands
%{lib_build_cmds}

%{app_build_cmds}

%{test_build_cmds}

# Link Commands
$(APP): $(LIBRARIES) $(APPOBJS)
	$(CXX) /Fe$@ $(APPOBJS) $(BOTAN_LIB) $(LINK_TO)

$(TEST): $(LIBRARIES) $(TESTOBJS)
	$(CXX) /Fe$@ $(TESTOBJS) $(BOTAN_LIB) $(LINK_TO)

$(BOTAN_LIB): $(LIBOBJS)
!If "$(SO_OBJ_FLAGS)" == ""
	$(AR) /OUT:$(BOTAN_LIB) $(LIBOBJS)
!Else
	$(LIB_LINK_CMD) /Fe$(LIBNAME) $(LIBOBJS) $(LINK_TO)
!Endif

%{python_in}

# Fake Targets

SPHINX_CONFIG = %{sphinx_config_dir}
SPHINX_OPTS = -b html

docs:
%{build_doc_commands}

clean:
	$(RM) %{build_dir}\lib\* %{build_dir}\tests\*
	$(RM) *.manifest *.exp *.dll
	$(RM) $(LIBRARIES) $(APP) $(TEST)

distclean: clean
	$(RM_R) %{build_dir}
	$(RMDIR) %{build_dir}\include\botan\internal
	$(RMDIR) %{build_dir}\include\botan
	$(RMDIR) %{build_dir}\include
	$(RMDIR) %{build_dir}\lib %{build_dir}\tests
	$(RMDIR) %{build_dir}
	$(RM) Makefile $(LIBNAME).* $(APP).*

install: $(LIBRARIES) docs
	-$(MKDIR) $(DESTDIR)\include\botan
	$(INSTALL_CMD) botan.* $(DESTDIR)
	$(INSTALL_CMD) build\include\botan\*.h $(DESTDIR)\include\botan

	-$(MKDIR) $(DESTDIR)\bin
	$(INSTALL_CMD) $(APP) $(DESTDIR)\bin

	-$(MKDIR) $(DESTDIR)\lib
	$(INSTALL_CMD) $(LIBRARIES) $(DESTDIR)\lib