OSDN Git Service

fix ticket #18663
[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 !if "$(CPU)" == "AMD64"
25 MAYU_ARCH       = 64
26 !else
27 MAYU_ARCH       = 32
28 !endif
29 OUT_DIR         = $(OUT_DIR_EXE)_$(MAYU_ARCH)
30 !endif  # TARGETOS
31
32 !if "$(TARGETOS)" == "WIN95"
33 APPVER          = 4.0
34 !ifdef nodebug
35 OUT_DIR         = out$(MAYU_VC)_win9x
36 !else   # nodebug
37 OUT_DIR         = out$(MAYU_VC)_win9x_debug
38 !endif  # nodebug
39 !endif  # TARGETOS
40
41 !if "$(TARGETOS)" == "BOTH"
42 !error Must specify TARGETOS=WIN95 or TARGETOS=WINNT
43 !endif  # TARGETOS
44
45 #_WIN32_IE      = 0x0500
46 !include <win32.mak>
47 #NMAKE_WINVER   = 0x0500        # trick for WS_EX_LAYERED
48
49 !ifdef nodebug
50 DEBUG_FLAG      = -DNDEBUG
51 !else   # nodebug
52 DEBUG_FLAG      = $(cdebug)
53 !endif  # nodebug
54
55 {}.cpp{$(OUT_DIR)}.obj:
56         $(cc) -EHsc $(cflags) $(cvarsmt) $(DEFINES) $(INCLUDES) \
57                 $(DEBUG_FLAG) -Fo$@ $(*B).cpp
58 {}.rc{$(OUT_DIR)}.res:
59         $(rc) $(rcflags) $(rcvars) /fo$@ $(*B).rc
60
61 !ifdef nodebug
62 conxlibsmt      = $(conlibsmt) libcpmt.lib libcmt.lib
63 guixlibsmt      = $(guilibsmt) libcpmt.lib libcmt.lib
64 !else   # nodebug
65 conxlibsmt      = $(conlibsmt) libcpmtd.lib libcmtd.lib
66 guixlibsmt      = $(guilibsmt) libcpmtd.lib libcmtd.lib
67 !endif  # nodebug
68
69 DEPENDFLAGS     = --cpp=vc --ignore='$(INCLUDE)' -p"$$(OUT_DIR)\\"      \
70                 --path-delimiter=dos --newline=unix                     \
71                 $(DEPENDIGNORE) -EHsc $(cflags) $(cvarsmt)      \
72                 $(DEFINES) $(INCLUDES) $(DEBUG_FLAG)
73
74 CLEAN           = $(OUT_DIR)\*.pdb
75
76
77 # tools         ###############################################################
78
79 RM              = del
80 COPY            = copy
81 ECHO            = echo
82 MKDIR           = mkdir
83 RMDIR           = rmdir