Subversion Repositories SvarDOS

Rev

Rev 523 | Rev 538 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 523 Rev 524
1
#
1
#
2
# This is a makefile to build the SVARCOM command interpreter (COMMAND.COM)
2
# This is a makefile to build the SVARCOM command interpreter (COMMAND.COM)
3
# using OpenWatcom and nasm.
3
# using OpenWatcom and nasm.
4
#
4
#
5
# You can use following targets:
5
# You can use following targets:
6
#
6
#
7
#  wmake           - compiles the program
7
#  wmake           - compiles the program
8
#  wmake clean     - cleans up all non-source files
8
#  wmake clean     - cleans up all non-source files
9
#
9
#
10
 
10
 
11
FEATURES =
11
FEATURES =
12
FEATURES += -DVERDBG
12
FEATURES += -DVERDBG
13
 
13
 
14
LDFLAGS = -0 -y -wx -mt -lr -we -d0 -ox -fm=command.map
14
LDFLAGS = -0 -y -wx -mt -lr -we -d0 -ox -fm=command.map
15
CFLAGS = -0 -wx -ms -we -d0 -ox $(FEATURES)
15
CFLAGS = -0 -wx -ms -we -d0 -ox $(FEATURES)
16
# -0   generate 8086 compatible code
16
# -0   generate 8086 compatible code
17
# -y   ignore %WCL% if present
17
# -y   ignore %WCL% if present
18
# -wx  maximum warnings level
18
# -wx  maximum warnings level
19
# -mt  TINY memory model
19
# -mt  TINY memory model
20
# -lr  real-mode target
20
# -lr  real-mode target
21
# -we  any warning is considered an error
21
# -we  any warning is considered an error
22
# -d0  no debug data
22
# -d0  no debug data
23
# -ox  maximum optimization level
23
# -ox  maximum optimization level
24
#
24
#
25
# NOTE: wcc does not understand -mt, that is why -ms must be passed instead
25
# NOTE: wcc does not understand -mt, that is why -ms must be passed instead
26
 
26
 
27
all: command.com
27
all: command.com
28
 
28
 
29
command.com: rmodcore.h command.obj cmd.obj doserr.obj env.obj redir.obj rmodinit.obj sayonara.obj helpers.obj
29
command.com: rmodcore.h command.obj cmd.obj doserr.obj env.obj redir.obj rmodinit.obj sayonara.obj helpers.obj
30
	*wcl $(LDFLAGS) command.obj cmd.obj doserr.obj env.obj redir.obj rmodinit.obj sayonara.obj helpers.obj
30
	*wcl $(LDFLAGS) command.obj cmd.obj doserr.obj env.obj redir.obj rmodinit.obj sayonara.obj helpers.obj
31
 
31
 
32
cmd.obj: cmd.c cmd\*.c
32
cmd.obj: cmd.c cmd\*.c
33
	wcc $(CFLAGS) cmd.c
33
	wcc $(CFLAGS) cmd.c
34
 
34
 
35
command.obj: command.c rmodcore.h
35
command.obj: command.c rmodcore.h
36
	wcc $(CFLAGS) command.c
36
	wcc $(CFLAGS) command.c
37
 
37
 
38
helpers.obj: helpers.c deflang.h
38
helpers.obj: helpers.c deflang.h
39
	wcc $(CFLAGS) helpers.c
39
	wcc $(CFLAGS) helpers.c
40
 
40
 
41
.c.obj:
41
.c.obj:
42
	wcc $(CFLAGS) $<
42
	wcc $(CFLAGS) $<
43
 
43
 
44
rmodcore.h: file2c.com rmod.bin
44
rmodcore.h: file2c.com rmod.bin
45
	file2c /s /l4096 rmod.bin rmodcore.h BUFFER
45
	file2c /s /l4096 rmod.bin rmodcore.h BUFFER
46
 
46
 
47
deflang.h: file2c.com tlumacz\default.lng
47
deflang.h: file2c.com tlumacz\default.lng
48
	file2c /l4096 tlumacz\default.lng deflang.h langblock
48
	file2c /l4096 tlumacz\default.lng deflang.h langblock
49
 
49
 
50
file2c.com: file2c.c
50
file2c.com: file2c.c
51
	wcl $(LDFLAGS) file2c.c
51
	wcl $(LDFLAGS) file2c.c
52
 
52
 
53
rmod.bin: rmod.asm
53
rmod.bin: rmod.asm
54
	nasm -f bin -l rmod.lst -o rmod.bin rmod.asm
54
	nasm -f bin -l rmod.lst -o rmod.bin rmod.asm
55
 
55
 
56
clean: .SYMBOLIC
56
clean: .SYMBOLIC
57
	del *.com
57
	del *.com
58
	del *.obj
58
	del *.obj
-
 
59
	del rmod.bin
-
 
60
	del rmod.lst
-
 
61
	del rmodcore.h
-
 
62
	del deflang.h
-
 
63
	del command.map
59
 
64
 
60
pkg: svarcom.zip
65
pkg: svarcom.zip
61
 
66
 
62
svarcom.zip: command.com
67
svarcom.zip: command.com
63
	zip -9 -j svarcom.zip command.com svarcom.txt todo.txt freecom.txt history.txt tlumacz\svarcom.lng
68
	zip -9 -j svarcom.zip command.com svarcom.txt todo.txt freecom.txt history.txt tlumacz\svarcom.lng
64
	mkdir source
69
	mkdir source
65
	copy makefile source\
70
	copy makefile source\
66
	copy *.c source\
71
	copy *.c source\
67
	copy *.h source\
72
	copy *.h source\
68
	copy *.txt source\
73
	copy *.txt source\
69
	copy *.asm source\
74
	copy *.asm source\
70
	mkdir source\cmd
75
	mkdir source\cmd
71
	copy cmd\*.* source\cmd\
76
	copy cmd\*.* source\cmd\
72
	mkdir source\tlumacz
77
	mkdir source\tlumacz
73
	copy tlumacz\*.* source\tlumacz\
78
	copy tlumacz\*.* source\tlumacz\
74
	mkdir source\tlumacz\lang
79
	mkdir source\tlumacz\lang
75
	copy tlumacz\lang\*.* source\tlumacz\lang\
80
	copy tlumacz\lang\*.* source\tlumacz\lang\
76
	zip -9 -r -m svarcom.zip source
81
	zip -9 -r -m svarcom.zip source
77
 
82