-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMAKEFILE
60 lines (48 loc) · 1.88 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
#
# Telnet makefile
#
# Possible optimizations for 8088 class processors
#
# -oa Relax alias checking
# -ob Try to generate straight line code
# -oe - expand user functions inline (-oe=20 is default)
# -oh Enable repeated optimizations
# -oi generate certain lib funcs inline
# -oi+ Set max inline depth (C++ only, use -oi for C)
# -ok Flowing of register save into function flow graph
# -ol loop optimizations
# -ol+ loop optimizations plus unrolling
# -or Reorder for pipelined (486+ procs); not sure if good to use
# -os Favor space over time
# -ot Favor time over space
# -ei Allocate an "int" for all enum types
# -zp2 Allow compiler to add padding to structs
# -zpw Use with above; make sure you are warning free!
# -0 8088/8086 class code generation
# -s disable stack overflow checking
# -zmf put each function in a new code segment; helps with linking
# Even thought this code is interactive, performance is important.
# Servers can flood us with data.
tcp_h_dir = ..\..\TCPINC\
tcp_c_dir = ..\..\TCPLIB\
common_h_dir = ..\..\INCLUDE
memory_model = -ml
compile_options = -0 $(memory_model) -DCFG_H="$(config)" -oh -ok -ot -s -oa -ei -zp2 -zpw -we -ob -ol+ -oi+
#compile_options += -i=$(tcp_h_dir) -i=$(common_h_dir)
tcpobjs = packet.obj arp.obj eth.obj ip.obj tcp.obj tcpsockm.obj udp.obj utils.obj dns.obj timer.obj ipasm.obj trace.obj
objs = telnet.obj telnetsc.obj telnetsx.obj keys.obj ymodem.obj misc.obj
all : clean telnet.exe
clean : .symbolic
@del telnet.exe
@del *.obj
@del *.map
patch : .symbolic
..\..\utils\ptach telnet.exe telnet.map $(memory_model)
.asm : $(tcp_c_dir)
.cpp : $(tcp_c_dir)
.asm.obj :
wasm -0 $(memory_model) $[*
.cpp.obj :
wpp $[* $(compile_options)
telnet.exe : $(tcpobjs) $(objs)
wlink system dos option map option eliminate option stack=4096 name $@ file *.obj