-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvc.mak
83 lines (68 loc) · 1.9 KB
/
vc.mak
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
############################################################## -*- Makefile -*-
#
# Makefile (Visual C++)
#
# make release version: nmake nodebug=1
# make debug version: nmake
#
###############################################################################
# VC++ rules ###############################################################
!if "$(TARGETOS)" == ""
TARGETOS = WINNT
!endif # TARGETOS
!if "$(TARGETOS)" == "WINNT"
APPVER = 5.0
!ifdef nodebug
OUT_DIR_EXE = out$(MAYU_VC)_winnt
!else # nodebug
OUT_DIR_EXE = out$(MAYU_VC)_winnt_debug
!endif # nodebug
!if "$(CPU)" == "AMD64"
MAYU_ARCH = 64
!else
MAYU_ARCH = 32
!endif
OUT_DIR = $(OUT_DIR_EXE)_$(MAYU_ARCH)
!endif # TARGETOS
!if "$(TARGETOS)" == "WIN95"
APPVER = 4.0
!ifdef nodebug
OUT_DIR = out$(MAYU_VC)_win9x
!else # nodebug
OUT_DIR = out$(MAYU_VC)_win9x_debug
!endif # nodebug
!endif # TARGETOS
!if "$(TARGETOS)" == "BOTH"
!error Must specify TARGETOS=WIN95 or TARGETOS=WINNT
!endif # TARGETOS
#_WIN32_IE = 0x0500
!include <win32.mak>
#NMAKE_WINVER = 0x0500 # trick for WS_EX_LAYERED
!ifdef nodebug
DEBUG_FLAG = -DNDEBUG
!else # nodebug
DEBUG_FLAG = $(cdebug)
!endif # nodebug
{}.cpp{$(OUT_DIR)}.obj:
$(cc) -EHsc $(cflags) $(cvarsmt) $(DEFINES) $(INCLUDES) \
$(DEBUG_FLAG) -Fo$@ $(*B).cpp
{}.rc{$(OUT_DIR)}.res:
$(rc) $(rcflags) $(rcvars) /fo$@ $(*B).rc
!ifdef nodebug
conxlibsmt = $(conlibsmt) libcpmt.lib libcmt.lib
guixlibsmt = $(guilibsmt) libcpmt.lib libcmt.lib
!else # nodebug
conxlibsmt = $(conlibsmt) libcpmtd.lib libcmtd.lib
guixlibsmt = $(guilibsmt) libcpmtd.lib libcmtd.lib
!endif # nodebug
DEPENDFLAGS = --cpp=vc --ignore='$(INCLUDE)' -p"$$(OUT_DIR)\\" \
--path-delimiter=dos --newline=unix \
$(DEPENDIGNORE) -EHsc $(cflags) $(cvarsmt) \
$(DEFINES) $(INCLUDES) $(DEBUG_FLAG)
CLEAN = $(OUT_DIR)\*.pdb
# tools ###############################################################
RM = del
COPY = copy
ECHO = echo
MKDIR = mkdir
RMDIR = rmdir