Subversion Repositories SvarDOS

Rev

Rev 538 | Rev 965 | 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
 
538 mateuszvis 29
command.com: rmodcore.h command.obj cmd.obj env.obj redir.obj rmodinit.obj sayonara.obj helpers.obj
30
	*wcl $(LDFLAGS) command.obj cmd.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
524 mateuszvis 59
	del rmod.bin
60
	del rmod.lst
61
	del rmodcore.h
62
	del deflang.h
63
	del command.map
394 mateuszvis 64
 
523 mateuszvis 65
pkg: svarcom.zip
394 mateuszvis 66
 
67
svarcom.zip: command.com
579 mateuszvis 68
	zip -9kDX -j svarcom.zip command.com svarcom.txt todo.txt freecom.txt history.txt tlumacz\svarcom.lng
523 mateuszvis 69
	mkdir source
70
	copy makefile source\
71
	copy *.c source\
72
	copy *.h source\
73
	copy *.txt source\
74
	copy *.asm source\
75
	mkdir source\cmd
76
	copy cmd\*.* source\cmd\
77
	mkdir source\tlumacz
78
	copy tlumacz\*.* source\tlumacz\
79
	mkdir source\tlumacz\lang
80
	copy tlumacz\lang\*.* source\tlumacz\lang\
579 mateuszvis 81
	zip -9rkDX -m svarcom.zip source