-
Notifications
You must be signed in to change notification settings - Fork 12
/
MAKEFILE.nmake
80 lines (58 loc) · 2.57 KB
/
MAKEFILE.nmake
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
CFLAGS=/permissive- /GS /GL /W3 /Gy /Zc:wchar_t /Zi /Gm- /O2 /sdl /Zc:inline /fp:precise /errorReport:prompt /WX- /Zc:forScope /Gd /Oi /MD /FC /EHsc /nologo /diagnostics:column
CDEFS=/D "NDEBUG" /D "WIN32" /D "_CRT_SECURE_NO_WARNINGS" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "XML_STATIC" /D "_MBCS"
LIBFLAGS=/LTCG /MACHINE:X64 /NOLOGO
BUILD_INC=.\include
BUILD_INC_EXT=$(BUILD_INC)\extern
BUILD_SRC=.\src
BUILD_EXT=.\extern
BUILD_DIR=.\x64\Release
BUILD_DIR_EXT=.\x64\Release\extern
# -- Global build rules -------------------------------
# Rules for all packages of the MSToolkit.
#------------------------------------------------------
.PHONY: all
all : output zlib expat mzparser core mstoolkit mstoolkitextern
# -- Output -------------------------------------------
# Create output directories
#------------------------------------------------------
output:
@if not exist $(BUILD_DIR) mkdir $(BUILD_DIR)
@if not exist $(BUILD_DIR_EXT) mkdir $(BUILD_DIR_EXT)
# -- MSToolkit ---------------------------------------
# The core MSToolkit files
#------------------------------------------------------
MSTOOLKIT_SRCDIR=$(BUILD_SRC)\MSToolkit
mstoolkit: $(BUILD_DIR)\*.obj
lib /OUT:"$(BUILD_DIR)\MSToolkit.lib" $(LIBFLAGS) $?
mstoolkitextern: $(BUILD_DIR_EXT)\*.obj
lib /OUT:"$(BUILD_DIR)\MSToolkitExtern.lib" $(LIBFLAGS) $?
core: $(MSTOOLKIT_SRCDIR)\*.cpp
cl $(CFLAGS) $(CDEFS) $(MSTOOLKIT_DEFS) /I"$(BUILD_INC)" /I"$(BUILD_INC_EXT)" /c /Fo$(BUILD_DIR)\ $?
clean:
del $(BUILD_DIR)\*.obj
# -- Expat --------------------------------------------
# XML support
#------------------------------------------------------
EXPAT_SRCDIR=$(BUILD_EXT)\expat-2.2.9\lib
expat : $(EXPAT_SRCDIR)\\*.c
cl $(CFLAGS) $(CDEFS) /I"$(BUILD_INC)" /c /Fo$(BUILD_DIR_EXT)\ $?
# This tool is deprecated.
# -- mzIMLTools ---------------------------------------
# mzIdentML support
#------------------------------------------------------
#MZID_SRCDIR=$(BUILD_SRC)\mzIMLTools
#
#mzid : $(MZID_SRCDIR)\\*.cpp
# cl $(CFLAGS) $(CDEFS) /I"$(BUILD_INC)" /c /Fo$(BUILD_DIR)\ $?
# -- mzParser -----------------------------------------
# mz(X)ML and mz5 file support
#------------------------------------------------------
MZP_SRCDIR=$(BUILD_SRC)\mzParser
mzparser : $(MZP_SRCDIR)\\*.cpp
cl $(CFLAGS) $(CDEFS) /I"$(BUILD_INC)" /I"$(BUILD_INC_EXT)" /c /Fo$(BUILD_DIR)\ $?
# -- zlib ---------------------------------------------
# zlib file compression
#------------------------------------------------------
ZLIB_SRCDIR=$(BUILD_EXT)\zlib-1.2.11
zlib : $(ZLIB_SRCDIR)\\*.c
cl $(CFLAGS) $(CDEFS) /I"$(BUILD_INC)" /c /Fo$(BUILD_DIR_EXT)\ $?