-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
127 lines (86 loc) · 2.46 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#
# SMAC - SubQMod's Macro Assembler for the Atari Jaguar
# Copyright (c) SubQMod, 2007-2009
# MAKEFILE for Windows Compilation using Microsoft Visual Studio C Compiler
# Currently tested against MS Visual Studio 2022 C Compiler
# Ensure that you have the correct compiler environment variables set
#
rm= rm
CC= cl
LINK= link
CFLAGS= -nologo -MT -W0 -O2 -DWIN32 -DNDEBUG -D_CONSOLE -c
LFLAGS= -nologo -subsystem:console -incremental:no
SRCS = amode.c debug.c direct.c eagen.c error.c expr.c listing.c mach.c macro.c mark.c object.c procln.c risca.c sect.c smac.c symbol.c token.c
OBJS = amode.obj debug.obj direct.obj eagen.obj error.obj expr.obj listing.obj mach.obj macro.obj mark.obj object.obj procln.obj risca.obj sect.obj smac.obj symbol.obj token.obj
#
# Build everything
#
all : mntab.h 68ktab.h kwtab.h risckw.h smac.exe
#
# Generated Sources for State Machines and Keyword, Directive and Mnemonic Definitions
#
mntab.h : mntab 68kmn kwgen.exe
cat mntab 68kmn | ./kwgen.exe mn >mntab.h
68ktab.h 68kmn : 68ktab 68ktab 68kgen.exe
./68kgen.exe 68kmn <68ktab >68ktab.h
kwtab.h : kwtab kwgen.exe
./kwgen.exe kw <kwtab >kwtab.h
risckw.h : kwtab kwgen.exe
./kwgen.exe mr <risctab >risckw.h
#
# Build Tools
#
kwgen.obj : kwgen.c
$(CC) $(CFLAGS) kwgen.c
kwgen.exe : kwgen.obj
$(LINK) $(LFLAGS) -out:"kwgen.exe" kwgen.obj
68kgen.obj : 68kgen.c
$(CC) $(CFLAGS) 68kgen.c
68kgen.exe : 68kgen.obj
$(LINK) $(LFLAGS) -out:"68kgen.exe" 68kgen.obj
#
# Build SMAC Executable
#
.c.obj:
$(CC) $(CFLAGS) $*.c
amode.obj : amode.c
$(CC) $(CFLAGS) amode.c
debug.obj : debug.c
$(CC) $(CFLAGS) debug.c
direct.obj : direct.c
$(CC) $(CFLAGS) direct.c
eagen.obj : eagen.c
$(CC) $(CFLAGS) eagen.c
error.obj : error.c
$(CC) $(CFLAGS) error.c
expr.obj : expr.c
$(CC) $(CFLAGS) expr.c
listing.obj : listing.c
$(CC) $(CFLAGS) listing.c
mach.obj : mach.c
$(CC) $(CFLAGS) mach.c
macro.obj : macro.c
$(CC) $(CFLAGS) macro.c
mark.obj : mark.c
$(CC) $(CFLAGS) mark.c
object.obj : object.c
$(CC) $(CFLAGS) object.c
procln.obj : procln.c
$(CC) $(CFLAGS) procln.c
risca.obj : risca.c
$(CC) $(CFLAGS) risca.c
sect.obj : sect.c
$(CC) $(CFLAGS) sect.c
smac.obj : smac.c
$(CC) $(CFLAGS) smac.c
symbol.obj : symbol.c
$(CC) $(CFLAGS) symbol.c
token.obj : token.c
$(CC) $(CFLAGS) token.c
smac.exe : $(OBJS)
$(LINK) $(LFLAGS) /out:"smac.exe" $(OBJS)
#
# Clean Build Environment
#
clean:
$(rm) $(OBJS) kwgen.obj 68kgen.obj smac.exe kwgen.exe 68kgen.exe kwtab.h 68ktab.h mntab.h risckw.h