-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
103 lines (89 loc) · 1.7 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
ORIGIN = PWB
ORIGIN_VER = 2.1.49
PROJ = player
PROJFILE = player.mak
DEBUG = 0
CC = cl
#CFLAGS_G = /W2 /BATCH /FR$*.sbr
CFLAGS_D = /f /Zi /Od
CFLAGS_R = /f- /Ot /Oi /Ol /Oe /Og /Gs
CXX = cl
#CXXFLAGS_G = /W2 /BATCH /FR$*.sbr
CXXFLAGS_D = /f /Zi /Od
CXXFLAGS_R = /f- /Ot /Oi /Ol /Oe /Og /Gs
ASM = ml
#AFLAGS_G = /Cx /W2 /FR$*.sbr
AFLAGS_D = /Zi
AFLAGS_R = /nologo
MAPFILE_D = NUL
MAPFILE_R = NUL
LFLAGS_G = /NOI /BATCH
LFLAGS_D = /CO /FAR
#LFLAGS_R = /EXE /FAR
LINKER = link
ILINK = ilink
LRF = echo > NUL
ILFLAGS = /a /e
#SBRPACK = sbrpack
NMAKEBSC1 = set
NMAKEBSC2 = nmake
BROWSE = 1
#PACK_SBRS = 1
FILES = player.asm codec.asm pci.ASM utils.asm cmdline.asm \
memalloc.asm file.asm ichwav.asm printhex.asm
OBJS = player.obj codec.obj pci.obj utils.obj cmdline.obj \
memalloc.obj file.obj ichwav.obj printhex.obj
all: $(PROJ).exe
.SUFFIXES:
.SUFFIXES:
.SUFFIXES: .obj .asm
$(PROJ).exe : $(OBJS)
-$(NMAKEBSC1) MAKEFLAGS=
!IF $(DEBUG)
$(LRF) @<<$(PROJ).lrf
$(RT_OBJS: = +^
) $(OBJS: = +^
)
$@
$(MAPFILE_D)
$(LIBS: = +^
) +
$(LLIBS_G: = +^
) +
$(LLIBS_D: = +^
)
$(DEF_FILE) $(LFLAGS_G) $(LFLAGS_D);
<<
!ELSE
$(LRF) @<<$(PROJ).lrf
$(RT_OBJS: = +^
) $(OBJS: = +^
)
$@
$(MAPFILE_R)
$(LIBS: = +^
) +
$(LLIBS_G: = +^
) +
$(LLIBS_R: = +^
)
$(DEF_FILE) $(LFLAGS_G) $(LFLAGS_R);
<<
!ENDIF
$(LINKER) @$(PROJ).lrf
.asm.obj :
!IF $(DEBUG)
$(ASM) /c $(AFLAGS_G) $(AFLAGS_D) /Fo$@ $<
!ELSE
$(ASM) /c $(AFLAGS_G) $(AFLAGS_R) /Fo$@ $<
!ENDIF
.asm.sbr :
!IF $(DEBUG)
$(ASM) /Zs $(AFLAGS_G) $(AFLAGS_D) /FR$@ $<
!ELSE
$(ASM) /Zs $(AFLAGS_G) $(AFLAGS_R) /FR$@ $<
!ENDIF
run: $(PROJ).exe
$(PROJ).exe $(RUNFLAGS)
debug: $(PROJ).exe
CV $(CVFLAGS) $(PROJ).exe $(RUNFLAGS)