Subversion Repositories SvarDOS

Rev

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

Rev 579 Rev 965
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 env.obj redir.obj rmodinit.obj sayonara.obj helpers.obj
29
command.com: rmodcore.h command.obj cmd.obj env.obj redir.obj rmodinit.obj sayonara.obj helpers.obj
-
 
30
	# GENERATE CODEPAGE-SPECIFIG VERSIONS OUT OF UTF-8 FILES
-
 
31
	CD LANG
-
 
32
	utf8tocp 437 EN-UTF8.TXT > EN.TXT
-
 
33
	utf8tocp 850 FR-UTF8.TXT > FR.TXT
-
 
34
	utf8tocp maz PL-UTF8.TXT > PL.TXT
-
 
35
	..\svarlang.lib\tlumacz en fr pl
-
 
36
	DEL ??.TXT
-
 
37
	MOVE /Y OUT.LNG ..\SVARCOM.LNG
-
 
38
	MOVE /Y DEFLANG.C ..
-
 
39
	CD ..
-
 
40
	# build the final executable
30
	*wcl $(LDFLAGS) command.obj cmd.obj env.obj redir.obj rmodinit.obj sayonara.obj helpers.obj
41
	*wcl $(LDFLAGS) command.obj cmd.obj deflang.c env.obj redir.obj rmodinit.obj sayonara.obj helpers.obj
31
 
42
 
32
cmd.obj: cmd.c cmd\*.c
43
cmd.obj: cmd.c cmd\*.c
33
	wcc $(CFLAGS) cmd.c
44
	wcc $(CFLAGS) cmd.c
34
 
45
 
35
command.obj: command.c rmodcore.h
46
command.obj: command.c rmodcore.h
36
	wcc $(CFLAGS) command.c
47
	wcc $(CFLAGS) command.c
37
 
48
 
38
helpers.obj: helpers.c deflang.h
49
helpers.obj: helpers.c
39
	wcc $(CFLAGS) helpers.c
50
	wcc $(CFLAGS) helpers.c
40
 
51
 
41
.c.obj:
52
.c.obj:
42
	wcc $(CFLAGS) $<
53
	wcc $(CFLAGS) $<
43
 
54
 
44
rmodcore.h: file2c.com rmod.bin
55
rmodcore.h: file2c.com rmod.bin
45
	file2c /s /l4096 rmod.bin rmodcore.h BUFFER
56
	file2c /s /l4096 rmod.bin rmodcore.h BUFFER
46
 
57
 
47
deflang.h: file2c.com tlumacz\default.lng
-
 
48
	file2c /l4096 tlumacz\default.lng deflang.h langblock
-
 
49
 
-
 
50
file2c.com: file2c.c
58
file2c.com: file2c.c
51
	wcl $(LDFLAGS) file2c.c
59
	wcl $(LDFLAGS) file2c.c
52
 
60
 
53
rmod.bin: rmod.asm
61
rmod.bin: rmod.asm
54
	nasm -f bin -l rmod.lst -o rmod.bin rmod.asm
62
	nasm -f bin -l rmod.lst -o rmod.bin rmod.asm
55
 
63
 
56
clean: .SYMBOLIC
64
clean: .SYMBOLIC
57
	del *.com
65
	del *.com
58
	del *.obj
66
	del *.obj
59
	del rmod.bin
67
	del rmod.bin
60
	del rmod.lst
68
	del rmod.lst
61
	del rmodcore.h
69
	del rmodcore.h
62
	del deflang.h
70
	del deflang.c
63
	del command.map
71
	del command.map
64
 
72
 
65
pkg: svarcom.zip
-
 
66
 
-
 
67
svarcom.zip: command.com
73
release: command.com
68
	zip -9kDX -j svarcom.zip command.com svarcom.txt todo.txt freecom.txt history.txt tlumacz\svarcom.lng
74
	#zip -9kDX -j svarcom.zip command.com svarcom.txt todo.txt freecom.txt history.txt tlumacz\svarcom.lng
69
	mkdir source
-
 
70
	copy makefile source\
-
 
71
	copy *.c source\
-
 
72
	copy *.h source\
-
 
73
	copy *.txt source\
-
 
74
	copy *.asm source\
-
 
75
	mkdir source\cmd
-
 
76
	copy cmd\*.* source\cmd\
-
 
77
	mkdir source\tlumacz
-
 
78
	copy tlumacz\*.* source\tlumacz\
-
 
79
	mkdir source\tlumacz\lang
-
 
80
	copy tlumacz\lang\*.* source\tlumacz\lang\
-
 
81
	zip -9rkDX -m svarcom.zip source
75
	zip -9rkDX svarcom.zip makefile *.c *.h *.txt *.asm cmd lang svarlang.lib
82
 
76