OSDN Git Service

forgot to "git add" modified files, so re-commit:
[yamy/yamy.git] / vc.mak
1 ############################################################## -*- Makefile -*-
2 #
3 # Makefile (Visual C++)
4 #
5 #       make release version: nmake nodebug=1
6 #       make debug version: nmake
7 #
8 ###############################################################################
9
10
11 # VC++ rules    ###############################################################
12
13 !if "$(TARGETOS)" == ""
14 TARGETOS        = WINNT
15 !endif  # TARGETOS
16
17 !if "$(TARGETOS)" == "WINNT"
18 APPVER          = 5.0
19 !ifdef nodebug
20 OUT_DIR_EXE     = out$(MAYU_VC)_winnt
21 !else   # nodebug
22 OUT_DIR_EXE     = out$(MAYU_VC)_winnt_debug
23 !endif  # nodebug
24 !ifdef X64
25 OUT_DIR         = $(OUT_DIR_EXE)_x64
26 !else
27 OUT_DIR         = $(OUT_DIR_EXE)_x86
28 !endif
29 !endif  # TARGETOS
30
31 !if "$(TARGETOS)" == "WIN95"
32 APPVER          = 4.0
33 !ifdef nodebug
34 OUT_DIR         = out$(MAYU_VC)_win9x
35 !else   # nodebug
36 OUT_DIR         = out$(MAYU_VC)_win9x_debug
37 !endif  # nodebug
38 !endif  # TARGETOS
39
40 !if "$(TARGETOS)" == "BOTH"
41 !error Must specify TARGETOS=WIN95 or TARGETOS=WINNT
42 !endif  # TARGETOS
43
44 #_WIN32_IE      = 0x0500
45 !include <win32.mak>
46 #NMAKE_WINVER   = 0x0500        # trick for WS_EX_LAYERED
47
48 !ifdef nodebug
49 DEBUG_FLAG      =
50 !else   # nodebug
51 DEBUG_FLAG      = $(cdebug)
52 !endif  # nodebug
53
54 {}.cpp{$(OUT_DIR)}.obj:
55         $(cc) -EHsc $(cflags) $(cvarsmt) $(DEFINES) $(INCLUDES) \
56                 $(DEBUG_FLAG) -Fo$@ $(*B).cpp
57 {}.rc{$(OUT_DIR)}.res:
58         $(rc) $(rcflags) $(rcvars) /fo$@ $(*B).rc
59
60 !ifdef nodebug
61 conxlibsmt      = $(conlibsmt) libcpmt.lib libcmt.lib
62 guixlibsmt      = $(guilibsmt) libcpmt.lib libcmt.lib
63 !else   # nodebug
64 conxlibsmt      = $(conlibsmt) libcpmtd.lib libcmtd.lib
65 guixlibsmt      = $(guilibsmt) libcpmtd.lib libcmtd.lib
66 !endif  # nodebug
67
68 DEPENDFLAGS     = --cpp=vc --ignore='$(INCLUDE)' -p"$$(OUT_DIR)\\"      \
69                 --path-delimiter=dos --newline=unix                     \
70                 $(DEPENDIGNORE) -EHsc $(cflags) $(cvarsmt)      \
71                 $(DEFINES) $(INCLUDES) $(DEBUG_FLAG)
72
73 CLEAN           = $(OUT_DIR)\*.pdb
74
75
76 # tools         ###############################################################
77
78 RM              = del
79 COPY            = copy
80 ECHO            = echo
81 MKDIR           = mkdir
82 RMDIR           = rmdir