Subversion Repositories SvarDOS

Rev

Rev 448 | Rev 478 | 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
 
476 mateuszvis 26
command.com: deflang.h rmod.h command.obj cmd.obj doserr.obj env.obj redir.obj rmodinit.obj sayonara.obj helpers.obj
27
	*wcl $(LDFLAGS) command.obj cmd.obj doserr.obj env.obj redir.obj rmodinit.obj sayonara.obj helpers.obj
349 mateuszvis 28
 
476 mateuszvis 29
.c.obj:
30
	wcc $(CFLAGS) $<
31
 
349 mateuszvis 32
rmod.h: file2c.com rmod.com
432 mateuszvis 33
	file2c /c rmod.com rmod.h rmod
349 mateuszvis 34
 
433 mateuszvis 35
deflang.h: file2c.com tlumacz\default.lng
36
	file2c /l4096 tlumacz\default.lng deflang.h langblock
37
 
349 mateuszvis 38
file2c.com: file2c.c
476 mateuszvis 39
	wcl $(LDFLAGS) file2c.c
349 mateuszvis 40
 
41
rmod.com: rmod.asm
42
	nasm -f bin -l rmod.lst -o rmod.com rmod.asm
43
 
44
clean: .SYMBOLIC
45
	del *.com
46
	del *.obj
394 mateuszvis 47
 
48
pkg: svarcom.zip
49
 
50
svarcom.zip: command.com
51
	zip -9 svarcom.zip command.com *.txt