Subversion Repositories SvarDOS

Rev

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