Subversion Repositories SvarDOS

Rev

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