forked from ZDoom/acc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
146 lines (117 loc) · 2.06 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# get the target for the compiler
target = $(strip $(shell $(CC) -dumpmachine))
# DOS and Windows executables should have the .exe extension.
# Other operating systems should be extension-less.
CC ?= gcc
ifeq ($(findstring mingw32,$(target)),mingw32)
EXENAME = acc.exe
else
ifeq ($(findstring djgpp,$(target)),djgpp)
EXENAME = acc.exe
else
EXENAME = acc
endif
endif
CFLAGS ?= -O2 -Wall -W
LDFLAGS ?= -s
VERNUM = 157
OBJS = \
acc.o \
error.o \
misc.o \
parse.o \
pcode.o \
strlist.o \
symbol.o \
token.o
SRCS = \
acc.c \
error.c \
misc.c \
parse.c \
pcode.c \
strlist.c \
symbol.c \
token.c \
common.h \
error.h \
misc.h \
parse.h \
pcode.h \
strlist.h \
symbol.h \
token.h \
Makefile \
acc.dsp \
acc.dsw
ACS = \
zcommon.acs \
zdefs.acs \
zspecial.acs \
zwvars.acs
$(EXENAME) : $(OBJS)
$(CC) $(OBJS) -o $(EXENAME) $(LDFLAGS)
acc.o: acc.c \
common.h \
error.h \
misc.h \
parse.h \
pcode.h \
strlist.h \
symbol.h \
token.h \
error.o: error.c \
common.h \
error.h \
misc.h \
token.h \
misc.o: misc.c \
common.h \
error.h \
misc.h \
parse.o: parse.c \
common.h \
error.h \
misc.h \
parse.h \
pcode.h \
strlist.h \
symbol.h \
token.h \
pcode.o: pcode.c \
common.h \
error.h \
misc.h \
pcode.h \
strlist.h \
strlist.o: strlist.c \
common.h \
error.h \
misc.h \
pcode.h \
strlist.h \
symbol.o: symbol.c \
common.h \
error.h \
misc.h \
pcode.h \
symbol.h \
parse.h \
token.o: token.c \
common.h \
error.h \
misc.h \
pcode.h \
symbol.h \
token.h \
parse.h \
clean:
rm -f $(OBJS) $(EXENAME)
# These targets can only be made with MinGW's make and not DJGPP's, because
# they use Win32 tools.
zipsrc: $(SRCS)
kzip /y acc$(VERNUM)-src.zip $(SRCS) "End User License ACC Source Code.doc"
zipbin: $(EXENAME) $(ACS)
kzip /y acc$(VERNUM).zip $(EXENAME) $(ACS)
zipwbin: Release/acc.exe $(ACS)
kzip /y acc$(VERNUM)win.zip Release/acc.exe $(ACS)