forked from mike-foster/npp-session-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
104 lines (74 loc) · 2.92 KB
/
Makefile
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
#-------------------------------------------------------------------------------
# SessionMgr nmake file
# 1. Check that you have environment variables PATH, INCLUDE and LIB defined.
# 2. Modify "setenv.cmd" with your toolchain paths.
# 3. Open a DOS box in the directory containing this makefile.
# 4. Run setenv, then run nmake.
PRJ=SessionMgr
O=obj
S=src
R=src\res
N=src\npp
X=src\xml
# http://msdn.microsoft.com/en-us/library/fwkeyyhe.aspx
CXX=cl
CXXFLAGS=/O2 /EHs /GR- /MT /nologo /W3 /WX- /Gd /Gm- /Fo$O\ /fp:fast /wd4995 \
/errorReport:none /Zc:wchar_t /DWIN32 /DNDEBUG /D_WINDOWS /D_USRDLL \
/D_WINDLL /DUNICODE /D_UNICODE /c
# http://msdn.microsoft.com/en-us/library/y0zzbyt4.aspx
LD=link
LIBS=user32.lib shell32.lib
LDFLAGS=/DLL /nologo /OUT:$O\$(PRJ).dll /INCREMENTAL:NO /MANIFEST:NO \
/MACHINE:X86 /ERRORREPORT:NONE
RC=rc
RCFLAGS=/nologo /fo$O\$(PRJ).res
RESDEPS=$R\resource.rc $R\resource.h $R\version.rc2 $R\version.h
NPPDEPS=$N\PluginInterface.h $N\Scintilla.h $N\Notepad_plus_msgs.h $N\menuCmdID.h
#-------------------------------------------------------------------------------
# Targets
default: init $(PRJ)
init:
if not exist $O\ mkdir $O
clean:
if exist $O\ del $O\*.obj & del $O\$(PRJ).*
#-------------------------------------------------------------------------------
# Link obj files to make dll
$(PRJ): $O\$(PRJ).obj $O\Settings.obj $O\DlgDelete.obj $O\DlgNew.obj $O\DlgRename.obj \
$O\DlgSessions.obj $O\DlgSettings.obj $O\DllMain.obj $O\Menu.obj $O\Properties.obj \
$O\ContextMenu.obj $O\System.obj $O\Util.obj $O\tinyxml2.obj $O\$(PRJ).res
$(LD) $(LDFLAGS) $(LIBS) $?
#-------------------------------------------------------------------------------
# Compile cpp files
$O\$(PRJ).obj: $S\$(@B).cpp $S\$(@B).h $(NPPDEPS)
$(CXX) $(CXXFLAGS) %s
$O\Settings.obj: $S\$(@B).cpp $S\$(@B).h
$(CXX) $(CXXFLAGS) %s
$O\DlgDelete.obj: $S\$(@B).cpp $S\$(@B).h
$(CXX) $(CXXFLAGS) %s
$O\DlgNew.obj: $S\$(@B).cpp $S\$(@B).h
$(CXX) $(CXXFLAGS) %s
$O\DlgRename.obj: $S\$(@B).cpp $S\$(@B).h
$(CXX) $(CXXFLAGS) %s
$O\DlgSessions.obj: $S\$(@B).cpp $S\$(@B).h
$(CXX) $(CXXFLAGS) %s
$O\DlgSettings.obj: $S\$(@B).cpp $S\$(@B).h
$(CXX) $(CXXFLAGS) %s
$O\DllMain.obj: $S\$(@B).cpp
$(CXX) $(CXXFLAGS) %s
$O\Menu.obj: $S\$(@B).cpp $S\$(@B).h $(NPPDEPS) $(RESDEPS)
$(CXX) $(CXXFLAGS) %s
$O\Properties.obj: $S\$(@B).cpp $S\$(@B).h
$(CXX) $(CXXFLAGS) %s
$O\ContextMenu.obj: $S\$(@B).cpp $S\$(@B).h
$(CXX) $(CXXFLAGS) %s
$O\System.obj: $S\$(@B).cpp $S\$(@B).h $(NPPDEPS)
$(CXX) $(CXXFLAGS) %s
$O\Util.obj: $S\$(@B).cpp $S\$(@B).h
$(CXX) $(CXXFLAGS) %s
$O\tinyxml2.obj: $X\$(@B).cpp $X\$(@B).h
$(CXX) $(CXXFLAGS) %s
#-------------------------------------------------------------------------------
# Compile resource files
$O\$(PRJ).res: $(RESDEPS)
$(RC) $(RCFLAGS) %s
#-------------------------------------------------------------------------------