Subversion Repositories SvarDOS

Rev

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

Rev 496 Rev 499
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: deflang.h rmodcore.h command.obj cmd.obj doserr.obj env.obj redir.obj rmodinit.obj sayonara.obj helpers.obj
29
command.com: deflang.h 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
.c.obj:
35
.c.obj:
36
	wcc $(CFLAGS) $<
36
	wcc $(CFLAGS) $<
37
 
37
 
38
rmodcore.h: file2c.com rmod.com
38
rmodcore.h: file2c.com rmod.com
39
	file2c /s /l4096 rmod.com rmodcore.h BUFFER
39
	file2c /s /l4096 rmod.com rmodcore.h BUFFER
40
 
40
 
41
deflang.h: file2c.com tlumacz\default.lng
41
deflang.h: file2c.com tlumacz\default.lng
42
	file2c /l4096 tlumacz\default.lng deflang.h langblock
42
	file2c /l4096 tlumacz\default.lng deflang.h langblock
43
 
43
 
44
file2c.com: file2c.c
44
file2c.com: file2c.c
45
	wcl $(LDFLAGS) file2c.c
45
	wcl $(LDFLAGS) file2c.c
46
 
46
 
47
rmod.com: rmod.asm
47
rmod.com: rmod.asm
48
	nasm -f bin -l rmod.lst -o rmod.com rmod.asm
48
	nasm -f bin -l rmod.lst -o rmod.com rmod.asm
49
 
49
 
50
clean: .SYMBOLIC
50
clean: .SYMBOLIC
51
	del *.com
51
	del *.com
52
	del *.obj
52
	del *.obj
53
 
53
 
54
pkg: svarcom.zip
54
pkg: svarcom.zip svarcsrc.zip
55
 
55
 
56
svarcom.zip: command.com
56
svarcom.zip: command.com
57
	zip -9 svarcom.zip command.com *.txt
57
	zip -9 -j svarcom.zip command.com svarcom.txt freecom.txt tlumacz\svarcom.lng
-
 
58
 
-
 
59
svarcsrc.zip: .SYMBOLIC
-
 
60
	zip -9 -r svarcsrc.zip makefile *.c *.h *.txt *.asm tlumacz cmd
58
 
61