This repository has been archived by the owner on Apr 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile.win
120 lines (106 loc) · 3.65 KB
/
Makefile.win
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
108
109
110
111
112
113
114
115
116
117
118
119
# Makefile.win for Win32 ActiveMQ-CPP
#
# Targets are:
#
# build - compile everything
# check - run APR regression tests
# install - compile everything
# clean - mop up everything
#
# You can override the build mechansim, choose only one;
#
# USEMAK=1 - compile from exported make files
# USESLN=1 - compile from converted .sln / .vcproj VC7+ files
#
# Define ARCH to your desired preference (your PATH must point
# to the correct compiler tools!) Choose only one;
#
# ARCH="Win32"
# ARCH="x64"
#
# Set CONFIG to your desired build type.
#
# CONFIG="ReleaseDLL"
# CONFIG="DebugDLL"
# CONFIG="Release"
# CONFIG="Debug"
#
# Set VERBOCITY to indicate how much information is logged about the build.
#
# VERBOCITY=quiet
# VERBOCITY=minimal
# VERBOCITY=normal
# VERBOCITY=detailed
# VERBOCITY=diagnostic
#
# For example;
#
# nmake -f Makefile.win PREFIX=C:\ActiveMQ-CPP build check install clean
#
!IF EXIST(".\vs2005-build\vs2005-activemq-cpp.sln") && ([msbuild /help > NUL 2>&1] == 0) \
&& !defined(USEMAK)
USESLN=1
USEMAK=0
!ELSEIF EXIST("activemq-cpp.mak")
USESLN=0
USEMAK=1
!ENDIF
CONFIGS="Release ReleaseDLL Debug DebugDLL"
PREFIX=..\ActiveMQ-CPP
CONFIG=Release
VERBOCITY=Normal
!IF [$(COMSPEC) /c cl /nologo /? \
| $(SystemRoot)\System32\find.exe "x64" >NUL ] == 0
ARCH=x64
!ELSE
ARCH=Win32
!ENDIF
!IF "$(CONFIG)" == "Debug" || "$(CONFIG)" == "DebugDLL"
POSTFIX="d"
!ENDIF
!MESSAGE ARCH = $(ARCH)
!MESSAGE CONFIG = $(CONFIG)
!MESSAGE VERBOCITY = $(VERBOCITY)
!MESSAGE PREFIX = $(PREFIX) (install path)
rebuild: clean build
all: build check
clean:
cd vs2005-build
-msbuild vs2005-activemq-cpp.sln /t:vs2005-activemq:Clean /p:Configuration=$(CONFIG);Platform=$(ARCH) /verbosity:$(VERBOCITY)
-msbuild vs2005-activemq-cpp.sln /t:vs2005-activemq-example:Clean /p:Configuration=$(CONFIG);Platform=$(ARCH)
-msbuild vs2005-activemq-cpp.sln /t:vs2005-activemq-integration-tests:Clean /p:Configuration=$(CONFIG);Platform=$(ARCH)
-msbuild vs2005-activemq-cpp.sln /t:vs2005-activemq-unittests:Clean /p:Configuration=$(CONFIG);Platform=$(ARCH)
cd ..
build:
cd vs2005-build
-msbuild vs2005-activemq-cpp.sln /t:vs2005-activemq /p:Configuration=$(CONFIG);Platform=$(ARCH) /verbosity:$(VERBOCITY)
-msbuild vs2005-activemq-cpp.sln /t:vs2005-activemq-example /p:Configuration=$(CONFIG);Platform=$(ARCH)
-msbuild vs2005-activemq-cpp.sln /t:vs2005-activemq-integration-tests /p:Configuration=$(CONFIG);Platform=$(ARCH)
-msbuild vs2005-activemq-cpp.sln /t:vs2005-activemq-unittests /p:Configuration=$(CONFIG);Platform=$(ARCH)
cd ..
checkamq:
cd vs2005-build\$(CONFIG)
.\vs2005-activemq-unittests.exe
cd ..\..\
check: checkamq
install:
echo Y >.y
echo A >.A
@if NOT EXIST "$(PREFIX)\." mkdir "$(PREFIX)"
@if NOT EXIST "$(PREFIX)\bin\." mkdir "$(PREFIX)\bin"
@if NOT EXIST "$(PREFIX)\include\." mkdir "$(PREFIX)\include"
@if NOT EXIST "$(PREFIX)\lib\." mkdir "$(PREFIX)\lib"
copy RELEASE_NOTES.txt "$(PREFIX)\RELEASE_NOTES.txt" <.y
copy LICENSE.txt "$(PREFIX)\LICENSE.txt" <.y
copy NOTICE.txt "$(PREFIX)\NOTICE.txt" <.y
xcopy src\main\*.h "$(PREFIX)\include\" /s /d < .a
!IF "$(CONFIG)" == "Debug" || "$(CONFIG)" == "Release"
copy .\vs2005-build\$(ARCH)\$(CONFIG)\libactivemq-cpp$(POSTFIX).lib "$(PREFIX)\lib\" <.y
!ELSE
copy .\vs2005-build\$(ARCH)\$(CONFIG)\activemq-cpp$(POSTFIX).lib "$(PREFIX)\lib\" <.y
copy .\vs2005-build\$(ARCH)\$(CONFIG)\activemq-cpp$(POSTFIX).exp "$(PREFIX)\lib\" <.y
copy .\vs2005-build\$(ARCH)\$(CONFIG)\activemq-cpp$(POSTFIX).dll "$(PREFIX)\bin\" <.y
copy .\vs2005-build\$(ARCH)\$(CONFIG)\activemq-cpp$(POSTFIX).pdb "$(PREFIX)\bin\" <.y
!ENDIF
del .y
del .a