summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 8703ae4441ea4b56f8e0328739b06f0a46f5668b (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
#

# makefile to be used with NMAKE for building source and

# installation packages

#

# prerequisites:

# - environment variable VSINSTALLDIR must point to your Visual Studio

#     or VCExpress installation folder

# - Info-zip must be found in the PATH

#

# run

#   nmake src

# to create a source package with name cv2pdb_src_<VERSION>.zip in

# ..\downloads

#

# run

#   nmake bin

# to create a binary package with name cv2pdb_<VERSION>.zip in

# ..\downloads


SRC = src\cv2pdb.cpp \
      src\cv2pdb.h \
      src\demangle.cpp \
      src\demangle.h \
      src\dwarf2pdb.cpp \
      src\dwarf.h \
      src\LastError.h \
      src\main.cpp \
      src\mscvpdb.h \
      src\mspdb.h \
      src\mspdb.cpp \
      src\PEImage.cpp \
      src\PEImage.h \
      src\symutil.cpp \
      src\symutil.h \
      src\dviewhelper\dviewhelper.cpp

ADD = Makefile \
      src\cv2pdb.vcproj \
      src\dviewhelper\dviewhelper.vcproj \
      src\cv2pdb.sln

DOC = VERSION README INSTALL LICENSE CHANGES TODO FEATURES autoexp.expand autoexp.visualizer

BIN = bin\Release\cv2pdb.exe bin\Release\dviewhelper.dll

TEST = test\cvtest.d \
      test\cvtest.vcproj \
      test\Makefile \

all: bin src

###############################

include VERSION

DOWNLOADS = ..\downloads

$(DOWNLOADS):
	if not exist $(DOWNLOADS)\nul mkdir $(DOWNLOADS)

###############################

ZIP = zip
SRC_ZIP = $(DOWNLOADS)\cv2pdb_src_$(VERSION).zip

src: $(DOWNLOADS) $(SRC_ZIP)

$(SRC_ZIP): $(SRC) $(ADD) $(DOC) $(TEST)
	if exist $(SRC_ZIP) del $(SRC_ZIP)
	$(ZIP) $(SRC_ZIP) -X $(SRC) $(ADD) $(DOC) $(TEST)
 
###############################

BIN_ZIP = $(DOWNLOADS)\cv2pdb_$(VERSION).zip

bin: $(DOWNLOADS) $(BIN_ZIP)

$(BIN_ZIP): $(BIN) $(DOC) Makefile
	if exist $(BIN_ZIP) del $(BIN_ZIP)
	$(ZIP) $(BIN_ZIP) -j -X $(BIN) $(DOC)

IDEDIR = $(VSINSTALLDIR)\Common7\IDE

$(BIN): $(SRC) $(ADD) $(TEST) VERSION
	if     exist "$(IDEDIR)\VCExpress.exe" "$(IDEDIR)\VCExpress.exe" /Build Release src\cv2pdb.sln
	if not exist "$(IDEDIR)\VCExpress.exe" "$(IDEDIR)\devenv.exe" /Build Release src\cv2pdb.sln

###############################

cv2pdb_exe:
    devenv /Project "cv2pdb"  /Build "Release|Win32" src\cv2pdb_vs12.sln

test: cv2pdb_exe
	cd ..\test && nmake test