Subversion Repositories SvarDOS

Rev

Rev 2191 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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