Subversion Repositories SvarDOS

Rev

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

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