forked from magiblot/tvision
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
90 lines (81 loc) · 2.1 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
.autodepend
.swap
!if !$d(TVDIR) # From the point of view of the underlying targets.
TVDIR = ..\..
TVFLAGS = $(TVFLAGS) -DTVDIR=$(TVDIR)
!endif
!if $d(DOS32)
TVFLAGS = $(TVFLAGS) -DDOS32
!endif
!if $d(WIN32)
TVFLAGS = $(TVFLAGS) -DWIN32
!endif
!if $d(DEBUG)
TVFLAGS = $(TVFLAGS) -DDEBUG
!endif
!if $d(TVDEBUG)
TVFLAGS = $(TVFLAGS) -DTVDEBUG
!endif
!if $d(OVERLAY)
TVFLAGS = $(TVFLAGS) -DOVERLAY
!endif
!if $d(ALIGNMENT)
TVFLAGS = $(TVFLAGS) -DALIGNMENT=$(ALIGNMENT)
!endif
!if $d(EXCEPTIONS)
TVFLAGS = $(TVFLAGS) -DEXCEPTIONS
!endif
!if $d(NO_STREAMABLE)
TVFLAGS = $(TVFLAGS) -DNO_STREAMABLE
!endif
!if $d(NOTASM)
TVFLAGS = $(TVFLAGS) -DNOTASM
!endif
!if !$d(PRJDIR)
PRJDIR = $(TVDIR)\PROJECT
!endif
!if !$d(EXCLUDE) # To avoid conflicts in files with both a CPP and ASM version.
!if $d(DOS32)
# This is done in several variables to work around the 'Command arguments too long' bug.
EXCLUDE2 = TVEXPOSD.CPP TVWRITE.ASM
EXCLUDE1 = EDITS.ASM FRAMELIN.ASM TVCURSOR.ASM TGRMV.ASM TTPRVLNS.ASM
!else
EXCLUDE1 = EDITS.CPP FRAMELIN.ASM TVCURSOR.CPP TGRMV.CPP TTPRVLNS.CPP
EXCLUDE2 = TVEXPOSD.CPP TVWRITE.CPP
!endif
!endif
all: source\tvision examples\tvdemo examples\tvdir examples\tvedit examples\tvhc
source\tvision:
CD ..\$@
IF EXIST *.CFG DEL *.CFG # In case build failed last time.
IF NOT EXIST excluded MD excluded
@for %f in ($(EXCLUDE1)) do IF EXIST %f MOVE %f excluded
@for %f in ($(EXCLUDE2)) do IF EXIST %f MOVE %f excluded
$(MAKEDIR)\$(MAKE) $(TVFLAGS) -DSRCDIR=.
MOVE excluded\* .
RD excluded
CD $(PRJDIR)
examples\tvdemo: source\tvision
CD ..\$@
IF EXIST *.CFG DEL *.CFG
$(MAKEDIR)\$(MAKE) $(TVFLAGS)
CD $(PRJDIR)
examples\tvdir: source\tvision
CD ..\$@
IF EXIST *.CFG DEL *.CFG
$(MAKEDIR)\$(MAKE) $(TVFLAGS)
CD $(PRJDIR)
examples\tvedit: source\tvision
CD ..\$@
IF EXIST *.CFG DEL *.CFG
$(MAKEDIR)\$(MAKE) $(TVFLAGS)
CD $(PRJDIR)
examples\tvhc: source\tvision
CD ..\$@
IF EXIST *.CFG DEL *.CFG
$(MAKEDIR)\$(MAKE) $(TVFLAGS)
CD $(PRJDIR)
clean:
CD ..\source\tvision
$(MAKEDIR)\$(MAKE) $(TVFLAGS) clean
CD $(PRJDIR)