File: makefile

package info (click to toggle)
infocom 4.01pl2-8
  • links: PTS
  • area: non-free
  • in suites: potato
  • size: 464 kB
  • ctags: 990
  • sloc: ansic: 8,232; perl: 961; makefile: 86
file content (185 lines) | stat: -rw-r--r-- 6,426 bytes parent folder | download | duplicates (2)
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
#
#	File:	makefile
#
#	(C)opyright 1987-1992 InfoTaskforce.
#

OBJECTS =	enhanced.o file.o fns.o globals.o infocom.o init.o input.o\
			interp.o io.o jump.o message.o object.o options.o\
			page.o plus_fns.o print.o property.o status.o\
			support.o variable.o

#
# Compile options are described below:
#
# ANSI_ESCAPE	: Compile a version that uses ANSI ESCAPE sequences for
#				  terminal output.
# ANSI_COLOR	: Compile a version that uses ANSI ESCAPE sequences with
#				  color handling for terminal output.
#				  (Works under both MS-DOS and UNIX!)
# BSD			: Compile on a BSD UNIX machine. (This also defines "UNIX")
# CHEAT			: Include the routines for spying on Object movement.
# CURSES		: Compile a version that uses curses features for
#				  terminal output. You may also have to include a
#				  curses library as well.
# CURSES_COLOR	: Compile a version that uses the color capabilities of
#				  UNIX System V R3 curses features for terminal output.
# DEBUG			: Compile a debug version of the interpreter. Compare
#				  output produced with this option against a working
#				  debug version when you suspect problems in the
#				  virtual machine [ this commonly produces error 21 ].
# LSC			: Compile on a Macintosh using LightSpeed C Version 2.01.
# MSC			: Compile on an MS-DOS machine using Microsoft C.
# MSDOS			: Compile on an MS-DOS machine.
# SYS_V			: Compile on a UNIX System V machine. (This also defines "UNIX")
# TERMCAP		: Compile a version that uses termcap features for
#				  terminal output. You may also have to include a
#				  termcap library as well.
# THINKC		: Compile on a Macintosh using THINK C Version 4.0.
# TURBOC		: Compile on an MS-DOS machine using Borland C or Turbo C.
# UNIX			: Compile on a UNIX machine.
#

#
#	Uncomment the following lines for compiling with Turbo C or
#	Borland C under MS-DOS.
#
#.SUFFIXES:	.exe .o .c
#
#CC =		bcc
#CFLAGS =	-DTURBOC -m$(MODEL) -G -O -Z
#MODEL =	c
#TC_DIR =	c:\bc
#TC_BIN =	$(TC_DIR)\bin
#
#.c.o:
#	$(TC_BIN)\$(CC) $(CFLAGS) -c -o$@ $*.c
#
#turboc:	$(OBJECTS) infocom.rc
#	echo $(TC_DIR)\lib\c0$(MODEL).obj + > info.cmd
#	echo enhanced.o file.o fns.o globals.o infocom.o init.o + >> info.cmd
#	echo input.o interp.o io.o jump.o message.o object.o + >> info.cmd
#	echo options.o page.o plus_fns.o print.o property.o + >> info.cmd
#	echo status.o support.o variable.o + >> info.cmd
#	echo ,infocom.exe,nul.map,$(TC_DIR)\lib\c$(MODEL).lib >> info.cmd
#	$(TC_BIN)\tlink @info.cmd
#	-rm info.cmd
#

infocom.rc:		makefile
	@echo # Default initialization file for MS-DOS machines > $@
	@echo # This overrides the number of screen rows automagically determined >> $@
	@echo # height 25 >> $@
	@echo # This overrides the number of screen columns automagically determined >> $@
	@echo # width 80 >> $@
	@echo # Attributes are specified in this order: >> $@
	@echo # normal, inverse, bold, inverse&bold, underline, inverse&underline, >> $@
	@echo # bold&underline, inverse&bold&underline >> $@
	@echo # The following attributes may be specified: >> $@
	@echo # normal, high, low, italic, underline, blink, fastblink, reverse >> $@
	@echo # f_black, f_red, f_green, f_yellow, f_blue, f_magenta, f_cyan, f_white >> $@
	@echo # b_black, b_red, b_green, b_yellow, b_blue, b_magenta, b_cyan, b_white >> $@
	@echo # Not all attributes may be supported >> $@
	@echo attr b_blue f_white >> $@
	@echo attr b_white f_blue >> $@
	@echo attr b_blue f_white high >> $@
	@echo attr b_white f_white high >> $@
	@echo attr b_blue f_red blink >> $@
	@echo attr b_white f_red >> $@
	@echo attr b_blue f_red high >> $@
	@echo attr b_white f_red high >> $@

.infocomrc:		makefile
	@echo '# Default initialization file for UNIX machines' > $@
	@echo '# This overrides the number of screen rows' >> $@
	@echo '# height 25' >> $@
	@echo '# This overrides the number of screen columns' >> $@
	@echo '# width 80' >> $@
	@echo '# This allows use of ANSI save/restore cursor features' >> $@
	@echo '# save' >> $@
	@echo '# Attributes are specified in this order:' >> $@
	@echo '# normal, inverse, bold, inverse&bold, underline, inverse&underline,' >> $@
	@echo '# bold&underline, inverse&bold&underline' >> $@
	@echo '# The following attributes may be specified:' >> $@
	@echo '# normal, high, low, italic, underline, blink, fastblink, reverse' >> $@
	@echo '# f_black, f_red, f_green, f_yellow, f_blue, f_magenta, f_cyan, f_white' >> $@
	@echo '# b_black, b_red, b_green, b_yellow, b_blue, b_magenta, b_cyan, b_white' >> $@
	@echo '# Not all attributes may be supported' >> $@
	@echo 'attr b_blue f_white' >> $@
	@echo 'attr b_white f_blue' >> $@
	@echo 'attr b_blue f_white high' >> $@
	@echo 'attr b_white f_white high' >> $@
	@echo 'attr b_blue f_red blink' >> $@
	@echo 'attr b_white f_red' >> $@
	@echo 'attr b_blue f_red high' >> $@
	@echo 'attr b_white f_red high' >> $@

#
#	For MSDOS Compilers, use either the Compact, Large or Huge Memory
#	Models ( these all use far data pointers ) because Standard Library
#	Functions such as "fread ()" are passed a buffer as a huge pointer.
#	Tiny, Small and Medium Models only allow near pointers in Standard
#	Library Function Parameters.
#
#	Uncomment the following lines for compiling with Microsoft C.
#
#.SUFFIXES:	.exe .o .c
#
#CC =		cl
#
#.c.o:
#	$(CC) $(CFLAGS) -DMSC -Fo$*.o -c $*.c
#

qc:
	make "CFLAGS=-AC -qc" "LIBS=graphics.lib" _msdos

msc:
	make "CFLAGS=-AC -Ozax" "LIBS=graphics.lib" _msdos

_msdos: $(OBJECTS) infocom.rc
	link $(OBJECTS),infocom.exe,,$(LIBS);

CC=gcc
OPTFLAG=-O

bsd_ansi:
	make CFLAGS='$(OPTFLAG) -DBSD -DANSI_ESCAPE' unix

bsd_ansic:
	make CFLAGS='$(OPTFLAG) -DBSD -DANSI_COLOR' unix

bsd_curses:
	make CFLAGS='$(OPTFLAG) -DBSD -DCURSES' LDFLAGS='-lcurses -ltermcap' unix

bsd:
	make CFLAGS='$(OPTFLAG) -DBSD -DTERMCAP' LDFLAGS='-ltermcap' unix

sysv_ansi:
	make CFLAGS='$(OPTFLAG) -DSYS_V -DANSI_ESCAPE' unix

sysv_ansic:
	make CFLAGS='$(OPTFLAG) -DSYS_V -DANSI_COLOR' unix

sysv_curses:
	make CFLAGS='$(OPTFLAG) -DSYS_V -DCURSES' LDFLAGS='-lcurses' unix

sysv_cursesc:
	make CFLAGS='$(OPTFLAG) -DSYS_V -DCURSES_COLOR' LDFLAGS='-lcurses' unix

sysv_termcap:
	make CFLAGS='$(OPTFLAG) -DSYS_V -DTERMCAP' LDFLAGS='-ltermlib' unix

sysv:
	make CFLAGS='$(OPTFLAG) -DSYS_V -DTERMINFO' LDFLAGS='-lcurses' unix

unix: $(OBJECTS)
	$(CC) $(OPTFLAG) -o infocom $(OBJECTS) $(LDFLAGS)

$(OBJECTS): infocom.h machine.h makefile

clean:
	rm -f *.o
	rm -f .infocomrc
	rm -f infocom.rc
	rm -f infocom