Subversion Repositories SvarDOS

Rev

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

Rev 479 Rev 487
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
LDFLAGS = -0 -y -wx -mt -lr -we -d0 -ox -fm=command.map
11
LDFLAGS = -0 -y -wx -mt -lr -we -d0 -ox -fm=command.map
12
CFLAGS = -0 -wx -ms -we -d0 -ox
12
CFLAGS = -0 -wx -ms -we -d0 -ox
13
# -0   generate 8086 compatible code
13
# -0   generate 8086 compatible code
14
# -y   ignore %WCL% if present
14
# -y   ignore %WCL% if present
15
# -wx  maximum warnings level
15
# -wx  maximum warnings level
16
# -mt  TINY memory model
16
# -mt  TINY memory model
17
# -lr  real-mode target
17
# -lr  real-mode target
18
# -we  any warning is considered an error
18
# -we  any warning is considered an error
19
# -d0  no debug data
19
# -d0  no debug data
20
# -ox  maximum optimization level
20
# -ox  maximum optimization level
21
#
21
#
22
# NOTE: wcc does not understand -mt, that is why -ms must be passed instead
22
# NOTE: wcc does not understand -mt, that is why -ms must be passed instead
23
 
23
 
24
all: command.com
24
all: command.com
25
 
25
 
26
command.com: deflang.h rmodcore.h command.obj cmd.obj doserr.obj env.obj redir.obj rmodinit.obj sayonara.obj helpers.obj
26
command.com: deflang.h rmodcore.h command.obj cmd.obj doserr.obj env.obj redir.obj rmodinit.obj sayonara.obj helpers.obj
27
	*wcl $(LDFLAGS) command.obj cmd.obj doserr.obj env.obj redir.obj rmodinit.obj sayonara.obj helpers.obj
27
	*wcl $(LDFLAGS) command.obj cmd.obj doserr.obj env.obj redir.obj rmodinit.obj sayonara.obj helpers.obj
28
 
28
 
-
 
29
cmd.obj: cmd.c cmd\*.c
-
 
30
	wcc $(CFLAGS) cmd.c
-
 
31
 
29
.c.obj:
32
.c.obj:
30
	wcc $(CFLAGS) $<
33
	wcc $(CFLAGS) $<
31
 
34
 
32
rmodcore.h: file2c.com rmod.com
35
rmodcore.h: file2c.com rmod.com
33
	file2c /s /l4096 rmod.com rmodcore.h BUFFER
36
	file2c /s /l4096 rmod.com rmodcore.h BUFFER
34
 
37
 
35
deflang.h: file2c.com tlumacz\default.lng
38
deflang.h: file2c.com tlumacz\default.lng
36
	file2c /l4096 tlumacz\default.lng deflang.h langblock
39
	file2c /l4096 tlumacz\default.lng deflang.h langblock
37
 
40
 
38
file2c.com: file2c.c
41
file2c.com: file2c.c
39
	wcl $(LDFLAGS) file2c.c
42
	wcl $(LDFLAGS) file2c.c
40
 
43
 
41
rmod.com: rmod.asm
44
rmod.com: rmod.asm
42
	nasm -f bin -l rmod.lst -o rmod.com rmod.asm
45
	nasm -f bin -l rmod.lst -o rmod.com rmod.asm
43
 
46
 
44
clean: .SYMBOLIC
47
clean: .SYMBOLIC
45
	del *.com
48
	del *.com
46
	del *.obj
49
	del *.obj
47
 
50
 
48
pkg: svarcom.zip
51
pkg: svarcom.zip
49
 
52
 
50
svarcom.zip: command.com
53
svarcom.zip: command.com
51
	zip -9 svarcom.zip command.com *.txt
54
	zip -9 svarcom.zip command.com *.txt
52
 
55