Subversion Repositories SvarDOS

Rev

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

Rev 1738 Rev 1745
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
 
-
 
13
# hidden (debug-oriented) features:
-
 
14
 
-
 
15
# display debug data within the "ver" screen
12
#FEATURES += -DVERDBG
16
#FEATURES += -DVERDBG
13
 
17
 
-
 
18
# dump the NLS collate table to screen at each DIR
-
 
19
#FEATURES += -DDIR_DUMPNLSCOLLATE
-
 
20
 
-
 
21
 
14
LDFLAGS = -0 -y -wx -mt -lr -we -d0 -ox -fm=command.map
22
LDFLAGS = -0 -y -wx -mt -lr -we -d0 -ox -fm=command.map
15
CFLAGS = -0 -wx -ms -we -d0 -ox $(FEATURES)
23
CFLAGS = -0 -wx -ms -we -d0 -ox $(FEATURES)
16
# -0   generate 8086 compatible code
24
# -0   generate 8086 compatible code
17
# -y   ignore %WCL% if present
25
# -y   ignore %WCL% if present
18
# -wx  maximum warnings level
26
# -wx  maximum warnings level
19
# -mt  TINY memory model
27
# -mt  TINY memory model
20
# -lr  real-mode target
28
# -lr  real-mode target
21
# -we  any warning is considered an error
29
# -we  any warning is considered an error
22
# -d0  no debug data
30
# -d0  no debug data
23
# -ox  maximum optimization level
31
# -ox  maximum optimization level
24
#
32
#
25
# NOTE: wcc does not understand -mt, that is why -ms must be passed instead
33
# NOTE: wcc does not understand -mt, that is why -ms must be passed instead
26
 
34
 
27
all: command.com
35
all: command.com
28
 
36
 
29
command.com: rmodcore.h command.obj cmd.obj deflang.obj env.obj redir.obj rmodinit.obj sayonara.obj helpers.obj
37
command.com: rmodcore.h command.obj cmd.obj deflang.obj env.obj redir.obj rmodinit.obj sayonara.obj helpers.obj
30
	# build the final executable
38
	# build the final executable
31
	*wcl $(LDFLAGS) command.obj cmd.obj deflang.obj env.obj redir.obj rmodinit.obj sayonara.obj helpers.obj svarlang.lib\svarlngs.lib
39
	*wcl $(LDFLAGS) command.obj cmd.obj deflang.obj env.obj redir.obj rmodinit.obj sayonara.obj helpers.obj svarlang.lib\svarlngs.lib
32
 
40
 
33
deflang.obj: lang\*.txt
41
deflang.obj: lang\*.txt
34
	# GENERATE CODEPAGE-SPECIFIC VERSIONS OUT OF UTF-8 FILES
42
	# GENERATE CODEPAGE-SPECIFIC VERSIONS OUT OF UTF-8 FILES
35
	CD LANG
43
	CD LANG
36
	utf8tocp 850 BR-UTF8.TXT > BR.TXT
44
	utf8tocp 850 BR-UTF8.TXT > BR.TXT
37
	utf8tocp 850 DE-UTF8.TXT > DE.TXT
45
	utf8tocp 850 DE-UTF8.TXT > DE.TXT
38
	utf8tocp 437 EN-UTF8.TXT > EN.TXT
46
	utf8tocp 437 EN-UTF8.TXT > EN.TXT
39
	utf8tocp 850 FR-UTF8.TXT > FR.TXT
47
	utf8tocp 850 FR-UTF8.TXT > FR.TXT
40
	utf8tocp maz PL-UTF8.TXT > PL.TXT
48
	utf8tocp maz PL-UTF8.TXT > PL.TXT
41
	utf8tocp 857 TR-UTF8.TXT > TR.TXT
49
	utf8tocp 857 TR-UTF8.TXT > TR.TXT
42
	..\svarlang.lib\tlumacz en br de fr pl tr > tlumacz.log
50
	..\svarlang.lib\tlumacz en br de fr pl tr > tlumacz.log
43
	DEL ??.TXT
51
	DEL ??.TXT
44
	MOVE /Y OUT.LNG ..\SVARCOM.LNG
52
	MOVE /Y OUT.LNG ..\SVARCOM.LNG
45
	MOVE /Y DEFLANG.C ..
53
	MOVE /Y DEFLANG.C ..
46
	CD ..
54
	CD ..
47
	wcc $(CFLAGS) deflang.c
55
	wcc $(CFLAGS) deflang.c
48
 
56
 
49
cmd.obj: cmd.c cmd\*.c
57
cmd.obj: cmd.c cmd\*.c
50
	wcc $(CFLAGS) cmd.c
58
	wcc $(CFLAGS) cmd.c
51
 
59
 
52
command.obj: command.c rmodcore.h
60
command.obj: command.c rmodcore.h
53
	wcc $(CFLAGS) command.c
61
	wcc $(CFLAGS) command.c
54
 
62
 
55
helpers.obj: helpers.c
63
helpers.obj: helpers.c
56
	wcc $(CFLAGS) helpers.c
64
	wcc $(CFLAGS) helpers.c
57
 
65
 
58
.c.obj:
66
.c.obj:
59
	wcc $(CFLAGS) $<
67
	wcc $(CFLAGS) $<
60
 
68
 
61
rmodcore.h: file2c.com rmod.bin
69
rmodcore.h: file2c.com rmod.bin
62
	file2c /s /l4096 rmod.bin rmodcore.h BUFFER
70
	file2c /s /l4096 rmod.bin rmodcore.h BUFFER
63
 
71
 
64
file2c.com: file2c.c
72
file2c.com: file2c.c
65
	wcl $(LDFLAGS) file2c.c
73
	wcl $(LDFLAGS) file2c.c
66
 
74
 
67
rmod.bin: rmod.asm
75
rmod.bin: rmod.asm
68
	bldrmod.bat
76
	bldrmod.bat
69
 
77
 
70
clean: .SYMBOLIC
78
clean: .SYMBOLIC
71
	del *.com
79
	del *.com
72
	del *.obj
80
	del *.obj
73
	del rmod.bin
81
	del rmod.bin
74
	del rmod.lst
82
	del rmod.lst
75
	del rmodcore.h
83
	del rmodcore.h
76
	del deflang.c
84
	del deflang.c
77
	del command.map
85
	del command.map
78
 
86
 
79
release: command.com .SYMBOLIC
87
release: command.com .SYMBOLIC
80
	# drop old packages if present
88
	# drop old packages if present
81
	IF EXIST svarcom.zip DEL svarcom.zip
89
	IF EXIST svarcom.zip DEL svarcom.zip
82
	IF EXIST svarcom.svp DEL svarcom.svp
90
	IF EXIST svarcom.svp DEL svarcom.svp
83
	# source package
91
	# source package
84
	zip -9rkDX svarcom.zip makefile *.c *.h *.txt *.asm cmd lang svarlang.lib
92
	zip -9rkDX svarcom.zip makefile *.c *.h *.txt *.asm cmd lang svarlang.lib
85
	# SvarDOS binary package
93
	# SvarDOS binary package
86
	mkdir appinfo
94
	mkdir appinfo
87
	mkdir bin
95
	mkdir bin
88
	mkdir doc
96
	mkdir doc
89
	mkdir doc\svarcom
97
	mkdir doc\svarcom
90
	copy *.txt doc\svarcom\
98
	copy *.txt doc\svarcom\
91
	copy svarcom.lsm appinfo\
99
	copy svarcom.lsm appinfo\
92
	copy svarcom.lng bin\
100
	copy svarcom.lng bin\
93
	upx -9 --8086 command.com
101
	upx -9 --8086 command.com
94
	zip -9rkDX -m svarcom.svp command.com appinfo bin doc
102
	zip -9rkDX -m svarcom.svp command.com appinfo bin doc
95
	rmdir appinfo
103
	rmdir appinfo
96
	rmdir bin
104
	rmdir bin
97
	rmdir doc\svarcom
105
	rmdir doc\svarcom
98
	rmdir doc
106
	rmdir doc
99
 
107