Subversion Repositories SvarDOS

Rev

Rev 513 | Rev 523 | 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
 
513 mateuszvis 29
command.com: 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
 
516 mateuszvis 35
command.obj: command.c rmodcore.h
36
	wcc $(CFLAGS) command.c
37
 
513 mateuszvis 38
helpers.obj: helpers.c deflang.h
39
	wcc $(CFLAGS) helpers.c
40
 
476 mateuszvis 41
.c.obj:
42
	wcc $(CFLAGS) $<
43
 
509 mateuszvis 44
rmodcore.h: file2c.com rmod.bin
45
	file2c /s /l4096 rmod.bin rmodcore.h BUFFER
349 mateuszvis 46
 
433 mateuszvis 47
deflang.h: file2c.com tlumacz\default.lng
48
	file2c /l4096 tlumacz\default.lng deflang.h langblock
49
 
349 mateuszvis 50
file2c.com: file2c.c
476 mateuszvis 51
	wcl $(LDFLAGS) file2c.c
349 mateuszvis 52
 
509 mateuszvis 53
rmod.bin: rmod.asm
54
	nasm -f bin -l rmod.lst -o rmod.bin rmod.asm
349 mateuszvis 55
 
56
clean: .SYMBOLIC
57
	del *.com
58
	del *.obj
394 mateuszvis 59
 
499 mateuszvis 60
pkg: svarcom.zip svarcsrc.zip
394 mateuszvis 61
 
62
svarcom.zip: command.com
510 mateuszvis 63
	zip -9 -j svarcom.zip command.com svarcom.txt todo.txt freecom.txt tlumacz\svarcom.lng
499 mateuszvis 64
 
65
svarcsrc.zip: .SYMBOLIC
66
	zip -9 -r svarcsrc.zip makefile *.c *.h *.txt *.asm tlumacz cmd